Realizing a module structure with endomorphisms I am required to show that there is a match between seeing an abelian group $M$ as an $R$-Module and homomorphisms $R\to \text{End}(M)$. Where the multiplication in $\text{End}(M)$ is defined as : $f\cdot g=g\circ f$.
I thought of a map $\phi:R\to \text{End}(M)$ to be defined as: $r\mapsto \varphi_r$ where $\varphi_r(m)=rm\in_{\text{module property}} M$
My problem is that I can't prove that $\phi$ is homomorphism of ring because of the definition of the multiplication in $\text{End}(M)$. Indeed:
$$\phi(r_1r_2)=\varphi_{r_{1}r_{2}}=\varphi_{r_{1}}\circ\varphi_{r_{2}}=\varphi_{r_{2}}\varphi_{r_{1}}=\phi(r_2)\phi(r_1)$$
Why does the multiplication is defined this way? also I think that I do not fully understand what is the question, so that might be the problem. Just to make it clear, the question was:
"There is a correlation between the options of considering the abelian group $M$ as an $R$-Module, and homomorphisms (of rings with identity) $R\to \text{End}(M)$
Help will be much appreciated!

Assuming $g\circ f(x):=g(f(x))$, then your computation is correct. Multiplication is not in the right order.
The situation is fine if you are defining a right module action, that is, $m\cdot r:=\phi_r(m)$.  In that case:
$\phi_{r_1r_2}(x)=xr_1r_2=\phi_{r_2}\circ\phi_{r_1}(x):=\phi_{r_1}\cdot\phi_{r_2}(x)$
You can check to see that $\phi$ is in fact a ring homomorphism $R\to End(M)$.

The way you are defining $\phi$ will describe a left module action, where $f\cdot g=f\circ g$.
