Put $R$ in [Smith normal form][1]. While this is usually defined for integer matrices, for a rational matrix $R$, we may write $R = P D Q$, where $P$ and $Q$ are in $GL_M(R)$ and $GL_N(R)$ respectively, and $D$ is a diagonal matrix with diagonal entries $d_1, d_2,\dotsc$ such that $d_{i+1}$ is an integer multiple of $d_i$ for $i = 1, 2, \dotsc$.

Now note that replacing $R$ by $D = P^{-1}RQ^{-1}$ does not change the isomorphism class of $R\mathbb Z^N/\mathbb Z^M$ or $R^T\mathbb Z^M/\mathbb Z^N$ (since $Q^{-1}\mathbb Z^N = \mathbb Z^N$ and $P^{-1T}\mathbb Z^M = \mathbb Z^M$).

Since $D$ is diagonal, $D\mathbb Z^N/\mathbb Z^N$ and $D^T \mathbb Z^M/\mathbb Z^M$ are both $\bigoplus_i (d_i \mathbb Z/\mathbb Z)$, and therefore isomorphic.


  [1]: http://en.wikipedia.org/wiki/Smith_normal_form