Let $R$ be a P.I.D. with $1$ and $M$ be an $R$-module that is annihilated by the nonzero, proper ideal $(a)$. Let $a=p_1^{\alpha_1}p_2^{\alpha_2}\cdots p_k^{\alpha_k}$ be the unique factorization of $a$. Let $M_i$ be the submodule of $M$ annihilated by $p_i^{\alpha_i}$. Prove that $M=M_1\oplus M_2\oplus \cdots \oplus M_k$.
My attempt so far:
For each $1\leq j \leq k$ define $a_j = \prod_{i\ne j} p_i^{\alpha_i}$. Let $\sum_{i=1}^{n} (a_jr_i)\cdot m_i$ be an arbitrary element of the submodule $(a_j)M$. We have $p_j^{\alpha_j}\cdot (\sum_{i=1}^{n} (a_jr_i)\cdot m_i) = (p_j^{\alpha_j}a_j(r_1 +\cdots + r_n))\cdot (m_1+\cdots +m_n) =(r_1 +\cdots +r_n)\cdot (a \cdot (m_1+\cdots +m_n)) =0$.
So $\sum_{i=1}^{n} (a_jr_i)\cdot m_i \in M_j$, so that $(a_j)M\subset M_j$. Next, let $m\in M_j$. Since $R$ is a P.I.D., we know $1= a_jx + p_j^{\alpha_j}y$ for some $x, y \in R$. So $m= 1\cdot m = (a_jx + p_j^{\alpha_j}y)\cdot m = xa_j \cdot m + yp_j^{\alpha_j} \cdot m = xa_j \cdot m +0 \in (a_j)M$. Conclude that $(a_j)M = M_j$.
Next, suppose $m\in (a_j)M\cap \sum_{t\ne j} (a_t)M$. We have $1\cdot m = xa_j \cdot m + yp_j^{\alpha_j} \cdot m= xa_j\cdot m + 0$. But note that $xa_j\cdot ((\sum_{t\ne j}a_t)\cdot m) = wa\cdot m$ for some $w\in R$, so that $xa_j\cdot ((\sum_{t\ne j}a_t)\cdot m) = 0$. It follows that $xa_j = 0$, and $m=0+0=0$. Conclude that $ (a_j)M\cap \sum_{t\ne j} (a_t)M = (0)$. Thus, $\sum_{i=1}^{k} (a_i)M$ is a direct sum.
At this point, I'm not sure how to actually show this direct sum is equal to $M$. The only thing I tried is applying the Chinese Remainder Theorem as follows, but it doesn't seem to work.
We have that $(a)M=(0)$. And since $R$ is a PID, we know that since $(p_i^{\alpha_i}, p_j^{\alpha_j})= (1) = R$ for any $i\ne j$, $(p_i^{\alpha_i})$ and $(p_j^{\alpha_j})$ are comaximal ideals.
So apply the Chinese Remainder Theorem to get $M\cong M/(p_1^{\alpha_1})M \times \cdots \times M/(p_k^{\alpha_k})M$.
I'd appreciate some help on finishing this.