Let $h\colon R\rightarrow S$ be a morphism of commutative ring. Let $M$ and $N$ be $R$-modules. We consider the canonical morphism of $R$-modules $$p\colon{\rm Hom}_R(S\otimes_RM,N)\rightarrow{\rm Hom}_R({\rm Hom}_R(S,M),N),\;u\mapsto(v\mapsto u(1_S\otimes v(1_S))).$$ Since source and target of this morphism can be canonically furnished with structures of $S$-modules, we may wonder:
Under which conditions is $p$ a morphism of $S$-modules?
I know for example that this is the case if $M$ is free of finite rank, or if $h$ is surjective and $M=S$, and I have the feeling (but no proof!) that it is not so in general.
(Motivation: This morphism and the question of its $S$-linearity showed up while I was trying to understand the behaviour of scalar coextension with respect to Hom functors.)
(Commutativity is probably not strictly necessary here, hence the tagging.)