Let $R$ a commutative ring, and $M$ a maximal ideal of $R$.
If there exists $n\in \mathbb{N}$ such that $M^n=0$, then $R$ is local.
In general, I have proved that $R/M^n$ is local with a unique maximal ideal $M/M^n$. But I don't see how to prove that $R$ is local.