I'm trying to prove any finite boolean ring $R$ is isomorphic to $\mathbb{Z}_2\times\cdots\times\mathbb{Z}_2$. I know this question is already on this site, but the proofs I saw used the ring's characteristic and that's not what I'm interested in. I want to prove it by defining an isomorphism between the two rings, but the one I thought was right didn't work. I'll explain what I did:
First, I noticed that, from previous exercises I did in my course that given that $R$ is boolean, then I know it's commutative and also that all of its ideals are principal. Since it only has principal ideals, it's a PID, and since it's a PID then it's a UFD. So I can select the finite family of irreducible elements $a_1,\dots,a_n\in R$ sufficient to make the factorisation of any element of $R$.
Then, given any $x\in R$, then it must verify $$x=a_1^{\beta_1}\cdots a_n^{\beta_n} \ \ , \ \ \beta_i\in\{0,1\}.$$ So I thought it would make sense to interpret these $\beta_i$ as the components of the equivalent of $x$ in the ring $\mathbb{Z}_2\times\cdots\times\mathbb{Z}_2$, to be said, I thought the right homomorphism would be
\begin{align*} \mathbb{Z}_2\times\cdots\times\mathbb{Z}_2 & \to R \\ (\beta_1,\dots,\beta_n) & \mapsto x=a_1^{\beta_1}\cdots a_n^{\beta_n}, \end{align*}
but if I'm not wrong, this is not an homomorphism (it does not verify the definition properties). Something about this feels so wrong to me, I was almost sure this was the right way to solve this problem. Where am I wrong? What can I do to solve this defining an isomorphism between both rings? Any help will be appreciated, thanks in advance.
Edit: I've just noticed my reasoning was wrong when I assumed that every ideal of $R$ being principal implied it being PID, since in order to be a PID it must be first an integral domain and that's not true in general, so it's just a principal ideal ring (not a domain). How can I approach this then?