Let R is a ring with $1_R$ and M a monoid, now let $R[M]:=\{f:M \rightarrow R , |\{x|f(x) \ne 0_R\}|< \infty \}$.
I have two questions:
1) I want to identify R and M with a subset of R[M] with $\alpha : R \rightarrow R[M]$ and $\beta : M \rightarrow R[M]$ in a such way that $\alpha(R) \cap \beta(M) = \emptyset$.
2) Let S a set (called a set of indeterminates), S* the free monoid and $\mathbb{N}[S]:=\{f:S \rightarrow \mathbb{N} , |\{x|f(x) \ne 0\}|< \infty \}$.
Is $R[{\mathbb{N}}[S]]$ the commutative polynomial ring over the indeterminates S?
Is $R[S^*]$ the noncommutative polynomial ring over the indeterminates S?
(1) The elements of $R[M]$ are usually represented as formal sums of the form $\sum_{m \in M} r_m m$, where the coefficients $r_m \in R$ are almost all equal to $0$. The sum is defined by $$ \sum_{m \in M} r_m m + \sum_{m \in M} s_m m = \sum_{m \in M} (r_m+s_m) m $$ and the product by $$ \Bigl(\sum_{m \in M} r_m m\Bigr) \Bigl( \sum_{m \in M} s_m m\Bigr) = \sum_{m \in M} \Bigl(\sum_{m_1m_2 = m} r_{m_1}s_{m_2}\Bigr) m $$ Now, the usual identifications consist to identify every $r \in R$ with $r1_M$ and every $m\in M$ with $1_Rm$. Note however that this leads to identify $1_R$ and $1_M$. I am not sure that your wish to have $\alpha(R) \cap \beta(M) = \emptyset$ is pertinent.
(2a) Actually $\mathbb{N}[S]$ is the free commutative monoid over the alphabet $S$. Its elements can be written as (commutative) monomials over $S$, of the form $\prod_{s \in S}s^{n_s}$, where the degrees $n_s$ are almost null. It follows that $R[{\mathbb{N}}[S]]$ is the ring of polynomials over the set of commutative indeterminates $S$.
Note the switch of the word "commutative", compared to your definition -- this ring can be defined over noncommutative rings.
(2b) Here $S^*$ is the free monoid over $S$ and $R[S^*]$ the ring of noncommutative polynomials over $S$. It is usually denoted by $R \langle S\rangle$.