Let $R$ be a commutative ring with $1$ and suppose that $e \in R$ is an idempotent, $e^2=e$.
We need to prove that the annihilator $A(e)$ of $e$ is a principal ideal.
The only thing I can start off with is that $A(e) =$ {$s \in R: es = 0$}.
But I am honestly not sure where to go from here. Any help would be much appreciated.
There is an obvious element of $A(e)$, namely $(1-e)$. Given we have only one suspect, let's try to prove that $A(e)=\langle 1-e\rangle$, i.e., that $es=0$ implies $s=(1-e)t=t-et$ for some $t$. Observe that finding suitable $t$ is not hard: picking $t=s$ works out nicely.