Equivalent definition of R-module I am studying a course of Commutative Algebra and I'm having trouble understanding an alternative definition of R-module. The standard definition is the following:
Let $R$ be a ring (commutative, with unity). An $R$–module is an
abelian group $(M, +)$ together with a map 
\begin{align*}
&R \times M \rightarrow  M\\
&(r, m) \mapsto r ∗ m =: rm \in M
\end{align*}
satisfying the following conditions:


*

*$(r + s)m = rm + sm$ for all $r, s \in R, m \in M.$

*$r(m + n) = rm + rn$ for all $r \in R, m, n \in M$.

*$(rs)m = r(sm)$ for all $r, s \in R, m \in M$.

*For all $m \in M$ one has $1m = m$ 


In my lectures notes it is said that the definition above is equivalent to the existence of a ring homomorphism 
\begin{align*}
&f:R \rightarrow End(M)&
\end{align*}
where $End(M)$ is the endomorphism ring of $M$
Here it comes my approach and where I'm stuck:
$\left( \impliedby \right)$:
Suppose there exists a ring homomorphism
\begin{align*}
&f: R \rightarrow End(M)&\\
& r \mapsto \lambda_{r}
\end{align*}
Then, we define 
\begin{align*}
&R \times M \rightarrow M \\
&(r, m) \mapsto \lambda_{r}(m)
\end{align*}
We have to check that this map satisfies properties $(1-4)$:
We have $1$ since $f$ is a ring homomorphism. 
We have $1$ since $\lambda_{r}$ is a group homomorphism.
We have $4$ since $1_{A}$ goes to $1_{End(M)}$ by $f$.
However, I am unable to prove $3$. I've tried using all the properties available, but I just can't see it.
$\left( \implies \right)$
This time, we define the ring homomorphism as it follows:
\begin{align*}
&f:R \rightarrow End(M)\\
&r \mapsto \lambda_{r}
\end{align*}
where
\begin{align*}
\lambda_{r}: M \rightarrow M\\
m \mapsto rm
\end{align*}
$f(r+s)=f(r)+f(s)$ is easy to see, using property $1$ of $M$ as $R-module$.
$f(1)=1$ because of property $4$.
Here, I also struggle, because I cannot proof $f(rs)=f(r)f(s)$.

I'd be very grateful if anyone can help me. Thanks in advance.
PD: Sorry for the writing of the maps. I'm new here and I'm not used to the language.
 A: $\implies$, 3): doesn't this follow from the fact that $f$ is a ring homomorphism, as in your verification of 1)?
$\impliedby$, $f(rs)=f(r)f(s)$: similarly, this follows from property 3)

Perhaps it may be good to emphasize that the group operation ring multiplication in $End(M)$ is function composition. That is, $\lambda_r \cdot \lambda_s$ applied to $m$ is $\lambda_r(\lambda_s(m))$, which in your case is $m \mapsto rsm$.
A: For the $(\Leftarrow)$ direction, 3 follows from ring homomorphism properties: $(rs)m = \lambda_{rs}(m)=(\lambda_r \circ \lambda_s)(m) = \lambda_r(\lambda_s(m)) = r(sm)$ 
Here, the second equality is a property of ring homomorphisms.
The other direction is similar.
A: thinking where your difficulty might have come from, it is perhaps worth mentioning as a footnote to your question that in this context we must distinguish the abelian group endomorphisms of $M$, which may be denoted by $End_{\mathbb{Z}}M$, from the $R$-module endomorphisms of $M$, which may be denoted $End_R M$.
condition (3) is the requirement for an abelian group endomorphism. to be an $R$-module endomorphism imposes the further requirement that:
$$
r(s(m)) = sr(m)
$$
which is not always satisfied when $R$ is not commutative
