Here is the outline for the proof:
Let $B=\{ v_1,...,v_n\}$ be a basis for $V$ and $C=\{w_1,..., w_m\}$ be a basis for $W$. We will now try to find a basis for $$\mathscr{L}(V,W) = \{T:V\rightarrow W\ |\ T \ \text{is linear} \}. $$
For each element of $\{1,..., m\} \times \{1,..., n\}$, consider the linear transformation $E^{p,q}$ whose image in the basis $B$ is given by $$E^{p,q}(v_i) = \begin{cases}
0, & \text{if $i\neq q$} \\
w_p, & \text{if $i = q$}
\end{cases}$$
All is left to do now is to prove that these linear transformations are linearly independent and that they span $\mathscr{L} (V,W)$, that is that they form a basis for that space. Since the set of these linear transformations has $nm$ elements, it follows that dim$\ \mathscr{L} (V,W) = nm$.
The details are for you to fill in, but the main idea is there. You should be able to prove that there are indeed linear transformations satisfying the given image on the basis and that the set is linearly independent and spans $\mathscr{L} (V,W)$ (if you don't, please let me know).
This proof was taken from Hoffman and Kunze's Linear Algebra book. The idea of the proof is pretty much the same as establishing an isomorphism between $\mathscr{L} (V,W)$ and $M_{m \times n}(F)$ (think about the matricial representation of a linear transformation from $V$ to $W$ with respect to the basis $B$ and $C$), which is "the usual" proof.