Proof (structure theorem)
Since $M$ is finitely generated, let $γ: R^m \twoheadrightarrow M$ be a generating surjection. By the first isomorphism theorem, $M \isom R^m/\ker γ$.
Since $\ker γ\leq R^m$ and $R$ is a Euclidean domain, there exists a basis $v_1, \ldots, v_m$ for $R^m$ such that $\ker γ$ is freely generated by $d_1 v_1, \ldots, d_r v_r$ where $0\leq r\leq m$, $d_i\neq 0$ and $d_i \mid d_{i+1}$. Therefore $$ \begin{align*} M \isom{}& (Rv_1 \oplus \ldots \oplus Rv_m) / (R(d_1 v_1) \oplus \ldots R(d_r v_r)) \\ \isom{}& R/(d_1) \oplus \ldots \oplus R/(d_r) \oplus R \oplus \ldots \oplus R. \end{align*} $$