$k[x]/(x^2)$ has only one prime ideal Let $k$ be a field. Then $k[x]/(x^2)$ has only one prime ideal.

It is clear that $(X)$ is the maximal ideal thus prime where $X$ is the class elements $x$. How do I know there aren't other prime ideals? I tried to define homomorphism $\phi':k[x]/(x^2)\to k$ by evaluation but it seems there is no other way to define the map well defined other than evaluating at 0 due to $\phi'([f])=\phi'([g])$ not equal for different representatives.
Suppose $\mathfrak{p}$ is a prime ideal. Then $x\cdot x = 0\in \mathfrak{p}$, so $x\in \mathfrak{p}$, and $(x)\subseteq \mathfrak{p}$. Since, as you note, $(x)$ is maximal, $(x) = \mathfrak{p}$.
Don't forget nontrivial assumption. Anyway suppose the representative ax+b is contained. Then as will (1/b×x)(ax+b). This tells you the class of 1 is there too after subtraction of ax and division by b. That then says everything is. Notice b was nonzero for this. That just leaves you with (x) as you already have.