If $\displaystyle R$ is a reduced ring and has only finitely many idempotents then prove that $\displaystyle R$ is a direct product of a finite number of indecomposable zero-dimensional reduced rings i.e. fields .
but then we wouldn't need the condition "R is reduced" anymore because it would be a result of the conditions "R is commutative" and "every principal ideal of R is an idempotent". here's why:
suppose $\displaystyle x^2=0.$ then, since $\displaystyle Rx=Rx^2=\{0\},$ we'll get $\displaystyle x=0,$ i.e. R is reduced. anyway, i'll assume the problem is this:
Claim: let R be a commutative ring with 1. if the number of idempotents of R is finite and every principal ideal of R is an idempotent ideal, then R is a direct product of finitely many fields.
Proof of the claim:
1) $\displaystyle J(R)=\{0\},$ where $\displaystyle J(R)$ is the Jacobson radical of $\displaystyle R$.
Proof: let $\displaystyle x \in J(R).$ since $\displaystyle Rx=R x^2,$ we have $\displaystyle x=yx^2,$ for some $\displaystyle y \in R.$ thus $\displaystyle x(1-yx)=0$ and hence $\displaystyle x=0$ because $\displaystyle 1-yx$ is a unit of R.
2) every principal ideal of R is generated by an idempotent.
Proof: let $\displaystyle I=Rx.$ since $\displaystyle Rx=Rx^2,$ we have $\displaystyle x=yx^2$ for some $\displaystyle y \in R.$ then $\displaystyle xy=e$ is an idempotent and it's easy to see that $\displaystyle I=Re.$
3) R is artinian.
Proof: since the number of idempotents of R is finite, the number of principal ideals of R must also be finite, by 2). so the number of ideals of R is finite and thus R is artinian.
4) R is a direct product of finitely many fields.
Proof: by 1) and 3), R is a commutative semisimple ring and therefore, by Wedderburn-Artin theorem, R is a direct product of finitely many fields.