Commutative unitary ring with exactly three ideals. I'm stuck on a question since yesterday which on the face of it looks really elementary to me but I seem to be missing a point.

Let $R$ be a commutative ring with unity which has exactly three ideals, $\{0\}, I$ and $R$. If $a,b \in I$ show that $ab=0$.

What I've tried:
I have shown that every element which is not in $I$ is a unit. Further since $I \neq R$, therefore element of $I$ is a non-unit. 
Suppose $ab \neq 0$. Then $I=\langle ab \rangle = \langle a \rangle\langle b \rangle=\langle a \rangle\langle a \rangle = I^2$.
I tried  to get a contradiction from this but couldn't reach anywhere.
Any hints are appreciated. 
Edit: I have only done a basic course on rings and fields, so I'm not familiar with "Nakayama Lemma" and such things.

$R$ is clearly a local ring with maximal ideal $I$ and $I$ is finitely generated. Thus Nakayama yields $I^2 \neq I$, hence $I^2=0$.

Here is another proof, which does not require much knowledge: Let $a \in I$. The set $\{x \in R | ax=0\}$ is an ideal, which is not equal to $0$. Thus it contains $I$.
Here is a proof, that it is not zero: If $a^2=0$, we are done. Otherwise we have $(a)=(a^2)$, hence there is some $b$ with $a^2b=a$ or $0=a(ab-1)$, i.e. $ab-1$ is contained in that set. Note that $ab-1$ is not zero, because $a$ is not a unit.

Just another note: These rings are not too artificial, an important example is the ring of dual numbers $K[\varepsilon]/(\varepsilon^2)$, which naturally arises when studying differentials from an algebraic point of view.
