If $M$ is finitely generated, then $\text{Ass}_R(M)$ is finite, hence $\bigoplus\limits_{{\mathfrak p}\in\text{Ass}_R(M)} M_{\mathfrak p}\cong\prod\limits_{{\mathfrak p}\in\text{Ass}_R(M)}M_{\mathfrak p}$ and the desired map is the product of the localization maps $M\to M_{\mathfrak p}$. If $M$ is not finitely generated and therefore $\text{Ass}_R(M)$ not necessarily finite, this only gives a morphism $$(\ddagger)\quad M\to\prod\limits_{{\mathfrak p}\in\text{Ass}_R(M)}M_{\mathfrak p}.$$
In any case, $(\ddagger)$ is injective: Check first that the kernel of $M\to M_{\mathfrak p}$ consists of those $m\in M$ for which $\text{Ann}_R(m)\not\subset{\mathfrak p}$. Hence, to prove injectivity you only have to find, for any $0\neq m\in M$, an associated prime ${\mathfrak p}\in\text{Ass}_R(M)$ such that $\text{Ann}_R(m)\subset{\mathfrak p}$, and such exists because any ideal which is maximal among the annihilators of non-zero elements of $M$ is associated.