Modules of Finite Length over Local Artinian Rings Let $R$ be a commutative local artinian ring with identity. Denote its maximal ideal by $\mathfrak{m}$ and let $\mathbb{k}$ denote the residue field $\mathbb{k}=R/\mathfrak{m}$. Assume also that there is a ring map $\mathbb{k} \rightarrow R$ such that the composition with the usual surjection $R \rightarrow \mathbb{k}$ is an isomorphism of $\mathbb{k}$. 

Show that if $M$ is an $R$-module of finite length then the dimension of $M$ as a $\mathbb{k}$-vector space is finite and that it is equal to the length of $M$.

My thoughts: I am completely lost in this in that I have a method that seems to "work" but does not use many of the above properties.
Since $M$ is a $\mathbb{k}$-vector space, it has a basis $\{m_i\}_{i \in \mathcal{I}}$ and I can write
$$
M=\langle m_1 \rangle \oplus \langle m_2 \rangle \oplus \cdots \oplus \langle m_n \rangle \oplus \cdots
$$
$\mathfrak{m}$ being a maximal ideal of course forces $\mathbb{k}$ to be a field so that is where the commutativity of $R$ comes in. I have used the maximality of $\mathfrak{m}$ but not the local property of $R$. I do not see how to use the given maps at all except that I feel that I should use them to force $M$ to be a finite direct sum. I know that $\langle m_i \rangle=\mathbb{k}m_i \cong \mathbb{k}$ as a vector space and these should be simple since they are 1-dimensional vector spaces. Once I know that $M$ is a finite direct sum, say of dimension $n$, that $M$ is then semisimple with $n$ terms in the summand of simple modules for $M$. But then $M$ being semisimple module forces $M$ to be isomorphic to the direct sum of the factors in any composition series so that I would be done. It is the middle part of this proof that I am unsure of how to approach. 
Any ideas, hints, or the like on how to show this?
 A: Let $0=M_0\subset M_1\subset\dotsc\subset M_n=M$ be a composition series of $M$, i.e. the length $l(M)=n$ and $M_{i+1}/M_i$ are simple $R$-modules.
Now, $R$ is a $k$-algebra, hence $M$, the $M_i$ and the $M_{i+1}/M_i$ are all $k$-modules.
Moreover, any simple $R$-module is isomorphic to $R/\frak{m}$ for some maximal ideal $\frak{m}$ in $R$. As $R$ is local, any simple $R$-module is therefore isomorphic to $k$ (as an $R$-module, hence also as a $k$-module; here you need that $k\to R\to k$ gives an isomorphism).
In particular, $\dim_k M_{i+1}/M_i=1$ for all $i$ and as the $M_i$ give a filtration of the $k$ vector space $M$, this implies $\dim_k M=n$.
To see what is happening, maybe it is good to consider some examples.
First, consider $R=M=k[x]/x^2$. This has $k$-dimension $2$ and, indeed, $l(M)=2$ as $(0)\subset(x)\subset M$ is a composition series. (This also illustrates that the length of a module should not be confused with the size of a generating set!)
Now, consider $R=M=k[x,y]_{(y)}$. Then the residue field is $k(X)$ and you see why the above argument requires $k\cong R/\frak{m}$ (the simple $R$-modules are now isomorphic to $k(X)$ and thus have infinite $k$-dimension).
A: Let $0=M_0\subset M_1\subset M_2\subset\cdots\subset M_n=M$ be a composition series. $M_1$ is a simple module over the ring $R$. So $M_1$ should be isomorphic to $R/m$. 
  Say by induction that the statement is known for modules of length $n-1$. So 
       $0\to M_{n-1}\rightarrow M_n\rightarrow M_n/M_{n-1}\to 0$ is an exact sequence such that the right most part is simple isomorphic to $R/m$ and hence the exact sequence split.
So $M$ is finite dimensional $k$-vector space of dimension same as length.  
