TITLE: Defining an $R$-module by using a ring homomorphism.
QUESTION [5 upvotes]: From Algebra by Hungerford:

Let $R$ and $S$ be rings and $\phi: R \rightarrow S$ a ring homomorphism. Then every $S$-module $A$ can be made into an $R$-module by defining $rx$ $(x \in A)$ to be $\phi(r)x$. One says that the $R$-module structure of $A$ is gen. by pullback along $\phi$.

I find this a bit confusing, because $\phi(r) \in S$ and not in $R$. Then how do we get an $R$-module if the scalars are from $S$?

REPLY [6 votes]: The datum of an $S$-module structure on an abelian group $A$ is precisely a ring homomorphism $\rho: S \rightarrow \operatorname{End}_{\text{Ab}}A$ where $\operatorname{End}_{\text{Ab}}A$ denotes the endomorphism ring of $A$. Indeed, defining $\rho(s)(a) = s \cdot a$ for every $s \in S$ and $a \in A$, it is straightforward to check that the module axioms are equivalent to the assertion that $\rho$ is a ring homomorphism.
Therefore given a ring homomorphism $\phi: R \rightarrow S$, the composite ring homomorphism $ \rho \circ\phi: R \rightarrow \operatorname{End}_{\text{Ab}}A$ puts an $R$-module structure on $A$.