Specific isomorphism of $\mathbb{R}^2$ as an $\mathbb{R}[X]$-module

I am reading some algebra notes by Keith Conrad, who offers the following example.

View $V = \mathbb{R}^2$ as an $\mathbb{R}[X]$-module where $X$ acts as the matrix $\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$. Note that $\{e_2, X(e_2)\}$ is a basis for $V$ and that $(X^2 - 2X + 1)(e_2) = 0$.

Therefore, $V \cong \mathbb{R}[X] / (X^2 - 2X + 1)$.

My linear algebra is rusty, so I don't see how the last line follows exactly. Any help please?

Define an $\mathbb R$-linear transformation $\phi:\mathbb R[X] \rightarrow V$ by
$$\phi(f) = f(T)e_2$$
This is also a homomorphism of $\mathbb R[X]$-modules. It is surjective, so $\phi$ induces an isomorphism of $\mathbb R[X]$-modules $\mathbb R[X]/I \rightarrow V$, where $I$ is the kernel of $\phi$.
You then need to check that $I = (X^2 - 2X+1)$.