Let $k$ be a field and consider the $k[x]$-modules
$$M = \frac{k[x]}{\langle x + 1 \rangle} \oplus \frac{k[x]}{\langle x + 1 \rangle} \quad \text{ and } \quad N = \frac{k[x]}{\langle (x + 1)^2 \rangle}.$$
How can I show that $ M \not\cong N $? It feels obvious but I cannot prove it.
$M$ is annihilated by $x+1$ but $N$ isn't.
Compare the Abelian groups $\Bbb Z/2\Bbb Z\oplus \Bbb Z/2\Bbb Z$ and $\Bbb Z/4\Bbb Z$.