How can we show that if $R$ is an infinite commutative ring and $R/I$ is finite for every nontrivial $I \unlhd R$, then $R$ is an integral domain?

I tried proceeding by contradiction: assume $a$,$b$ $\in R \backslash \{0\}$ and $ab=0$; then $R/(a)$ and $R/(b)$ must be finite, say $R/(a)=\{k_i + (a) : 1 \leq i \leq m\}$ and $R/(b)=\{l_j + (b) : 1 \leq j \leq n\}$. Does this mean R must be finite? Or what about using the fact that $R/(a,b)$ finite?

@GeorgesElencwajg: Maybe you understand better in abstract terms: whenver $ab=0$ in a commutative ring $R$, the surjective map $r\mapsto br:R\to bR$ induces an surjective $R$-module morphism $R/aR\to bR$, so if $R/aR$ and $R/bR$ are both finite, then $R$ must be finite as well (and in fact its order divides $\#(R/aR)\times\#(R/bR)$).
–
Marc van LeeuwenMar 30 '12 at 11:44

Suppose absurdly that $R$ is not a domain, hence $0$ is not a prime ideal. Therefore, for every prime ideal $\mathfrak{p}$ of $R$, the domain $R / \mathfrak{p}$ is finite, hence a field. So every prime ideal of $R$ is maximal, i.e. $R$ is artinian. Therefore $R$ is a direct product of some of its quotients, hence $R$ is finite.

A few comments: the condition on $R$ implies ACC, so $R$ is always Noetherian. Second, this reasoning only reduces to the case where $R$ is local, i.e. the direct product has only 1 factor. To finish from here, one can argue as in the other answer: if $(R,m)$ is Artinian local, and $m^k = 0, m^{k-1} \ne 0$, then pick $0 \ne x \in m^{k-1}$, and note that $|(x)| = |R/m| < \infty$ (since $mx = 0$), so $|R| \le |(x)||R/(x)| < \infty$
–
zcnOct 20 '14 at 22:35