Cayley-Hamilton theorem

Statement
Let $$R$$ be a commutative unital ring, and $$I \subset R$$ be an ideal. Let $$M$$ be a $$R$$-module that can be generated by $$n$$ elements.

if $$\phi$$ is an endomorphism of $$M$$ such that $$\phi(M) = IM$$, then there exists a monic polynomial:

$$p(x) = x^n + p_1x^{n-1} + p_2x^{n-2} + \ldots + p_n$$

such that $$p(\phi) = 0$$ as an endomorphism of $$M$$ and such that each $$p_j \in I^j$$.