Prove that an $R$-module $M$ is finitely generated if and only if... Necesaary definitions:
Let $M$ be an $R$-module. We know that $F^R(A) \cong R^{\oplus A}$ where $F^R(A)$ is a free $R$-module on the set $A$ and 
$R^{\oplus A} = \{ \alpha: A \to R| \alpha(a) \neq 0$ for only finitely many elements $a \in A \}$
with operations defined elementwise:
$(\alpha + \beta)(a) = \alpha(a) + \beta(a), (r\alpha)(a) = r(\alpha(a))$
Define $j_a \in R^{\oplus A}: j_a(x) = 1$ if $x = a$ and $j_a(x) = 0$ if $x \neq a$.
Now, every element $f \in R^{\oplus A}$ may be written uniquely as a finite sum 
$\sum\nolimits_{a \in A} r_a j_a$ where $r_a = f(a)$.
Now, we know that if $A$ is a finite set $F^R(A) \cong R^{\oplus n}$ where $n$ can be expressed as a direct sum of $R \ \  n$ times.
Definition of the submodule generated by $A$ in $M$:
By the universal property of free modules, there is a unique homomorphism of $R$-modules
$\phi_A: R^{\oplus A} \to M, \phi_A(j_a) = a$. The image of this homomorphism is a submodule of $M$, the submodule generated by $A$ in $M$, denoted $\langle A \rangle$. Please, use this definition.
My question:
Now, my book says that the module $M$ is finitely generated if and only if there is a surjective homomorphism of $R$-modules
$R^{\oplus n} \to M$
for some $n$. That's what I need to prove.
Obviously, if $M$ is generated by $A \subseteq M: |A| = n$. Then there is a surjection $\phi_A: R^{\oplus A} \to M, \phi_A(j_a) = a$. There is also a bijection $R^{\oplus n} = R^{\oplus A}$ is $|A| = n$, then we can compose these functions and get a surjective homomorphism $R^{\oplus n} \to M$.
However, what can we do to prove "if" part?

If there is a surjective homomorphism $\phi:R^{\oplus n}\to M$ for some $n$, then because of surjectivity, it takes generators to generators. 
Now $R^{\oplus n}$ is generated by the $n$ elements $j_0,j_1,\dots,j_{n-1}$ of your notation, thus $M$ is generated by $\phi(j_0),\dots,\phi(j_{n-1})$.
