Suppose $S$ is a commutative, projective, $R$-algebra of finite type (with $R$ a ring). We want to show that, if $M$ is any $S$-module, then there exists a canonical isomorphism: $ Hom_{S\otimes_R S}(S \otimes_R M,M\otimes_R S)\to Hom_{S\otimes_R S}(End_R(S), End_R(M))$ given by $f\mapsto\tilde{f}$ where, if $f(1\otimes m)=\sum_i t_i\otimes m_i$ then $\tilde{f}(s\otimes\varphi)(m)=\sum_i sm_i\varphi(t_i)$. Note that we are using the well known fact that $End_R(S)\cong S\otimes_R S^\ast$.
I'm still stuck trying to prove the injectivity, but I think that both the injectivity and the surjectivity will follow from the fact that, being $S$ projective and of finite type, every element $s\in S$ can be written as $s=\sum_{i=1}^n \psi_i(s)s_i $ (note that the sum is finite!) where the $s_i$'s and the $\varphi_i$'s do not depend on $s$. Could you help me with that? Thank you.