Jacobson radical and Frattini group The Frattini subgroup of $\Bbb{Z}_p \times\Bbb Z _{p^2}.$

According to this answer, the Frattini subgroup is equivalently its Jacobson radical as a ring (this
is actually true for any ring that is a finite direct product of
quotient rings of $\mathbf{Z}$).

How can I formally prove this statement?
I want to use this statement to find the Frattini subgroup of a given ring like product of quotient groups of $\mathbf{Z}$. Thank you.
 A: Lemma 1: if $M$ and $N$ are any abelian groups, $C<M\times N$ is a maximal subgroup, and $D\leqslant M\times N$ is any subgroup, then $C\cap D\leqslant D$ is either all of $D$ or is a maximal subgroup of $D$.
Proof: Note that, since $C$ is maximal in $M\times N$, $M\times N\big/C$ is simple. But also, $$D\big/C\cap D\cong (C+D)\big/C$$ is a subgroup of $M\times N\big/C$, so by simplicity either $D\big/C\cap D$ is trivial or $D\big/C\cap D\cong M\times N\big/C$. In the first case, $C\cap D=D$, and in the second case, $D\big/C\cap D$ is simple, whence $C\cap D$ is maximal in $D$.

Lemma 2: if $M,N$ are any abelian groups, then $\Phi(M\times N)=\Phi(M)\times\Phi(N)$. (Note that we do not need a finiteness condition here, nor any condition on whether $M$ or $N$ have maximal subgroups. So the Frattini subgroups are much better behaved for abelian groups than for non-abelian ones. This lemma does not hold for non-abelian groups in general.)
Proof: If $A$ (resp. $B$) is a maximal subgroup of $M$ (resp. $N$), then $A\times N$ (resp. $M\times B$) is a maximal subgroup of $M\times N$. Hence we have
\begin{align}
\Phi(M\times N)&\leqslant(\bigcap_{\substack{A<M \\{ \text{max}}}}A\times N)\space\cap\space(\bigcap_{\substack{B<N \\{ \text{max}}}}M\times B)
\\&=(\Phi(M)\times N)\cap(M\times\Phi(N))
\\&=\Phi(M)\times\Phi(N)
\end{align}
For the other direction, it suffices to show the two inclusions $\Phi(M)\times 0\leqslant\Phi(M\times N)$ and $0\times\Phi(N)\leqslant\Phi(M\times N)$. Hence let $C<M\times N$ be any maximal subgroup. By lemma 1, $C\cap(M\times 0)$ is either all of $M\times 0$ or is maximal in $M\times 0$, and in both cases $\Phi(M)\times 0=\Phi(M\times 0)\leqslant C$. Since $C$ was arbitrary, we hence have $\Phi(M)\times 0\leqslant\Phi(M\times N)$, and exactly the same argument shows $0\times\Phi(N)\leqslant\Phi(M\times N)$, so we are done.

Now let $R$ be a finite direct product of quotient rings of $\mathbb{Z}$, say $R=(\mathbb{Z}\big/n_1\mathbb{Z})\times\dots\times(\mathbb{Z}\big/n_k\mathbb{Z})$. By induction and lemma 2 we have $\Phi(R)=\Phi(\mathbb{Z}\big/n_1\mathbb{Z})\times\dots\times\Phi(\mathbb{Z}\big/n_k\mathbb{Z})$. On the other hand, every ideal of a finite product of rings is a product of the constituent rings' ideals, so every maximal ideal of $R$ is of the form $(\mathbb{Z}\big/n_1\mathbb{Z})\times\dots \times M\times\dots\times(\mathbb{Z}\big/n_k\mathbb{Z})$, where $M$ is a maximal ideal of some $\mathbb{Z}\big/n_i\mathbb{Z}$. Hence $J(R)=J(\mathbb{Z}\big/n_1\mathbb{Z})\times\dots\times J(\mathbb{Z}\big/n_k\mathbb{Z})$.
(Looking at your previous questions it looks like you have a bit of confusion about this latter point, so try filling in the details yourself and show that $J(R_1\times\dots\times R_k)=J(R_1)\times\dots\times J(R_k)$ for any commutative rings $R_i$.)
Thus to show $J(R)=\Phi(R)$ all we need to show is that $J(\mathbb{Z}\big/n\mathbb{Z})=\Phi(\mathbb{Z}\big/n\mathbb{Z})$ for any $n\in\mathbb{Z}$, but this is clear, as the ideals of $\mathbb{Z}\big/n\mathbb{Z}$ are precisely the subgroups of $\mathbb{Z}\big/n\mathbb{Z}$.
