Let $R$ be a PID.
Let $M$ be a $R$-module with generating set $\{m_1, m_2, ..., m_n\}$.
Let $R^{(n)}=\{f\mid f:\{1, 2, ..., n\}\to R\}$ be the free module with basis $$\{e_i\in R^{(n)}\mid e_i=(0, 0, ..., 0, 1_{i\text{th position}}, 0, ..., 0, 0), ~1\leq i\leq n\}.$$
Define $\phi:R^{(n)}\to M$ by $\phi(e_i)=m_i$. That is, $\phi\left(\sum_{i=1}^{n}r_i e_i\right)=\sum_{i=1}^{n}r_i m_i$. Then $\phi$ is an onto $R$-module homomorphism.
Since $K=\ker{\phi}$ is a submodule of the free module $R^{(n)}$, we know that $K$ has a finite linearly independent generating set $\{k_1, k_2, ..., k_m\}$, where $m\leq n$.
Suppose that $$(k_1, k_2, ..., k_m)=(e_1, e_2, ..., e_n)A.$$ for some $A\in M_{n\times m}(R)$.
The textbook (Jacobson's Algebra I and Goodman's Algebra) state that there exist invertible matrices $P\in M_n(R)$ and $Q\in M_m(R)$ such that $$PAQ=\text{diag}(\underbrace{d_1, d_2, ..., d_s, 0, ..., 0}_{\min{(n, m)}\text{ terms}}), ~r\leq \min{(n, m)}=m.$$
I have tried some concrete examples, for example, $M=\Bbb{Z}_2\oplus \Bbb{Z}_3\oplus \Bbb{Z}$ over $\Bbb{Z}$. But I can't find an example which has a $0$ in its smith normal form $\text{diag}(d_1, d_2, ..., d_s, 0, 0, ..., 0)$.
Could someone give an example $\phi$ which has a $0$ in the Smith Normal Form?
Edit: If $A$ is a $m$-by-$n$ matrix and $a_{ij}=0$ for every $i\neq j$, then we write $A=\text{diag}(a_{11}, a_{22}, ..., a_{kk})$, where $k=\min{(m, n)}$. For example, $$\begin{pmatrix} a_{11} & 0\\ 0 & 0\\ \hline 0 & 0\\ \end{pmatrix}=\text{diag}(a_{11},0).$$ $$\begin{pmatrix} a_{11} & 0 & 0\\ 0 & a_{22} & 0\\ 0 & 0 & 0\\ \end{pmatrix}=\text{diag}(a_{11},a_{22},0).$$ $$\begin{pmatrix} a_{11} & 0 & 0 & 0 & 0 & 0\\ 0 & a_{22} & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0\\ \end{pmatrix}=\text{diag}(a_{11},a_{22},0,0).$$