In a [question](http://mathoverflow.net/questions/12009/is-there-a-slick-proof-of-the-classification-of-finitely-generated-abelian-groups) asked by Ben Webster, Harry Gindi commented that it is possible to prove the classification theorem from finitely generated abelian groups by appealing primary decomposition. I have never been able to figure out exactly how primary decomposition helps one to prove the classification theorem. What i do know: If $G \cong \mathbb{Z}^{\oplus k} \oplus \mathbb{Z} / p_{1}^{n_1} \oplus \dots \oplus \mathbb{Z}/ p_{s}^{n_s}$ then the associated primes of $G$ are $(0), p_1 \mathbb{Z}, \dots, p_{n_s} \mathbb{Z}$. This is an exercise in Eisenbud. This tells you how to write down a reduced primary decomposition of $0$ inside $G$. Question: How does one use primary decomposition to prove the structure theorem for finitely generated abelian groups?