Let $R$ be a commutative ring with $1_R$.
I found the following theorem as an equivalent definition of $R-$modules.
Theorem. An abelian group $(M,+)$ is an $R$-module iff there is a ring homomorphism $\varphi:R\longrightarrow \mathrm{End}_R(M)$.
The proof is not difficult but let me ask something.
Could we claim that the theorem is still valid, if $R$ is not commutative? So, left $R-modules are in general different from the right.
And if the answer is yes, if we have an abelian group $(M,+)$, and there exists a homomorphism $\varphi:R\longrightarrow \mathrm{End}_R(M)$, then we can construct both left and right $R-$modules.
Is this right? Please, explain your answers please.
Thank you.
An abelian group $M$ can be given the structure of $R$-module if and only if there exists a ring homomorphism $$ \varphi\colon R\to\operatorname{End}_{\mathbb{Z}}(M) $$ If $M$ is given a structure of $R$-module, then the homomorphism $\varphi$ is defined by $\phi(r)\colon x\mapsto rx$. Conversely, given the ring homomorphism $\varphi$, we can define $rx=\varphi(r)(x)$.
It is true that if $M$ has already been given the structure of $R$-module, then there exists a ring homomorphism $R\to\operatorname{End}_{R}(M)$ (for commutative $R$), but without a previous $R$-module structure, $\operatorname{End}_{R}(M)$ doesn't make sense, so the statement cannot be “if and only if”.
By the way, there could be different ring homomorphisms $R\to\operatorname{End}_{\mathbb{Z}}(M)$, giving rise to different structures of $R$-modules on the abelian group $M$.
If you write maps on the left, then the condition about ring homomorphisms works also without the assumption that $R$ is commutative and defines left $R$-modules.
A structure of right $R$-module is given by a ring homomorphism $\psi\colon R^{\mathrm{op}}\to\operatorname{End}_{\mathbb{Z}}(M)$, where $R^{\mathrm{op}}$ is the opposite ring (with the same addition and multiplication $(r,s)\mapsto sr$).