Let $R$ be a PID. and let $p_1,p_2$ be irreducible elements with $(p_1) \neq (p_2)$. Let $e_1,e_2$ be non-negative integers. I want to show that the only $R$-module homomorphism $$ R/(p_1^{e_1}) \to R/(p_2^{e_2}) $$ is the zero homomorphism.
My attempt so far. Let $\phi : R/(p_1^{e_1}) \to R/(p_2^{e_2})$ be a homomorphism. Then $\overline{p_1^{e_1}} = \overline{0} \mapsto \overline{0} = \overline{p_2^{e_2}}$. So we have $\phi(\overline{p_1^{e_1}}) = \overline{p_2^{e_1}}$. How to proceed from here?
Extended: Let $x = \phi(1)$. Then we have (omitting the bars) $\phi(p_1^{e_1}) = \phi(p_1)^{e_1} = (p_1 \phi(1))^{e_1} = p_1^{e_1} \phi(1) = p_1^{e_1} x \in (p_2^{e_2})$. So $p_1^{e_1}x = r p_2^{e_2}$ for some $r \in R$. I'm aiming now to conclude that $x = 0$ on the basis of $(p_1) \neq (p_2)$, am I on the right track? I haven't seemingly used the fact yet that $R$ is a PID.
You arrived at $p_1^{e_1}x=rp_2^{e_2}$, which is on the right track. However you used, that $\phi(p_1^{e_1})=\phi(p_1)^{e_1}$, which assumes that $\phi$ is multiplicative. But $\phi$ is only assumed to be $R$-linear. In fact the $R$-linearity suffices to arrive at this statement (omitting the bars): $$0=\phi(p_1^{e_1})=p_1^{e_1}\phi(1)=p_1^{e_1}x$$ Thus, there is some $r\in R$, such that $p_1^{e_1}x=rp_2^{e_2}$. The assumption $(p_1)\neq(p_2)$ simply means, that $p_1$ and $p_2$ are not associated. $R$ is a PID and hence a UFD. The equation $p_1^{e_1}x=rp_2^{e_2}$ therefore implies, that $p_2^{e_2}|x$. This prooves, that $\phi(1)=0$.