I am not sure how to deal with the following problem:
$I$ and $J$ are distinct maximal ideals in a commutative ring $R$ and if $\phi$ is a modules homomorphism from $R$-module $R/I$ to $R$-module $R/J$, then it must be trivial.
I've just started to learn Modules Theory.
Thanks for any help.
Since $I$ and $J$ are maximal, the modules $R/I$ and $R/J$ are simple. A module $M$ is simple when its only submodules are $\{0\}$ and $M$; simplicity of $R/I$ is exactly the same as maximality of $I$, by the homomorphism theorems.
If $f\colon R/I\to R/J$, then you have just two possibilities:
$\ker f=\{0\}$; in this case $f$ must be an isomorphism (prove it);
$\ker f=\{R/I\}$; in this case $f$ is the trivial homomorphism.
You have to exclude case 1; how? If $x\in R$, then the annihilator of $x+I\in R/I$ contains $I$ (prove it). If $f\colon M\to N$ is an isomorphism and $x\in M$, then the annihilator of $x$ is the same as the annihilator of $f(x)$.
Recall that the annihilator of $x\in M$ is $\{r\in R:rx=0\}$ (which is an ideal of $R$).