Torsion-free module morphism I am trying to prove the statement:

Let $R$ be a PID but not a field and let $M$ be an $R$-module. Then $$ M \space \text{is  torsion-free $R$-module} \space \text{iff} \space \operatorname{Hom}_R(S,M)=0 \space \text{for all simple $R$-modules } S.$$

I could show (or at least I think I could) the implication $M$ is torsion-free then the only morphism from a simple $R$-module to $M$ is the trivial one:
Take $S$ simple $R$-module and $f \in \operatorname{Hom}_R(S,M)$, one can show that $S$ is simple iff $S \cong R/ \langle p \rangle$ for $p$ irreducible. Using this property, we have an isomorphism of $R$-modules $g:  R/ \langle p \rangle \to S$. 
Take $s \in S$, there is $\overline{a} \in R/ \langle p \rangle : g(\overline{a})=s$, then $0=g(\overline{0})=g(p\overline{a})=pg(\overline{a})=ps$. Now, for any $0 \neq s \in S$, we have $0=f(ps)=pf(s)$, and since $f(s) \in M$ which is torsion-free and $p \neq 0$, one must thus have $f(s)=0$. It follows $f$ is exactly $0$.
I don't know what to do to show the other implication, I would appreciate suggestions to complete the solution and also if someone could check if what I wrote is correct, feel free to make any corrections and/or add an alternative proof for that part.
 A: If $M$ is simple, then $M\simeq R/(p)$ with $p\in R$ irreducible. Let $f\in \operatorname{Hom}(R/(p),M)$. We have $f(\bar 1)\in M$ and $pf(\bar 1)=f(p\cdot\bar 1)=f(\bar 0)=0$. Since $M$ is torsion-free we get $f(\bar 1)=0$, so $f(\bar a)=0$ for all $a\in R$, that is, $f=0$.
Conversely, $\operatorname{Hom}(R/(p),M)=0$ for all $p\in R$ irreducible. Let $x\in M$ such that $px=0$ for some $p$. Then define $f:R/(p)\to M$ by $f(\bar a)=ax$. This is well defined (why?) and an $R$-module homomorphism, so $f=0$. In particular, $f(\bar 1)=0$, so $x=0$.
Now let $x\in M$ and $a\in R$ such that $ax=0$. If $a$ is invertible then $x=0$. If not, then $a=p_1\cdots p_n$ with $p_i$ irreducible. By induction on $n$ one gets $x=0$.
A: I assume $M$ to be finitely generated. So I can use the fundamental decomposition 
theorem for module over PID. The theorem states that $M = R^n \oplus (\bigoplus_i R/p_i^{a_i})$, where $n$ is the rank of $M$. If $\operatorname{Hom}(S,M)=0$ for all simple modules $S$, then $M$ is torsion-free, as there would be no $R/p_i$ parts. Hence statement is proved. 
A: Any simple module is torsion, so if $\operatorname{Hom}_R(S,M)\ne0$ for a simple module $S$, then $M$ contains a submodule isomorphic to $S$ and so it is not torsionfree.
Conversely, suppose $M$ is not torsionfree; if $x\in M$ is a torsion element, $x\ne0$, then $xR$ is isomorphic to $R/aR$ for some $a\ne0$, $a$ non invertible. The ring $R/aR$ is artinian, because it is noetherian and has Krull dimension zero (every prime ideal is maximal), so $xR\cong R/aR$ is artinian, hence it has essential socle. In particular it has at least a simple submodule.
