TITLE: A commutative noetherian ring in which each ideal $I$ is principal and $I^2=I$ must be a finite product of fields
QUESTION [6 upvotes]: PROBLEM A commutative noetherian ring $R$ in which each ideal $I$ is principal and $I^2=I$ must be a finite product of fields.

I am lost with the condition $I^2=I$ and the desired result "a finite product of fields". In particular, I totally don't know how to use the condition$I^2=I$? 
Also, I guess this question possibly do with the following question:

Let $R$ be a commutative ring with 1 in which each ideal is prime. Show
  that $R$ is a field.

Please help!

REPLY [2 votes]: By Nakayama's lemma, a principal ideal satisfying $I^2=I$ is generated by an idempotent, and is therefore a direct summand of $R$. 
Therefore all ideals are direct summands, meaning that $R$ is semisimple Artinian. By the Artin Wedderburn theorem, such a ring is a finite product of fields.
It's already been pointed out that as stated the Noetherian hypothesis is superfluous, since all ideals are finitely generated already. If you meant that all principal ideals satisfy $I^2=I$ then the above argument can be adapted in the following way.
You can conclude that all principal ideals are direct summands, therefore $R$ is Von Neumann regular, and a Noetherian VNR ring is semisimple Artinian.