I was trying to prove the following:
Let $R$ be a Noetherian ring and let $M$ be a finitely generated $R$-module. Then $M$ has finite length if and only if $\mathrm{dim}(M)=0$.
I was able to prove only one direction:
if $M$ is finitely generated, we have the following ascending chain
$0 = M_0 \subset M_1 \subset \dots \subset M_r = M$
and $M_i/M_{i-1} \cong A/\mathfrak{p_i}$ for $1 \leq i \leq r$, where each $\mathfrak{p_i}$ is a prime ideal of $R$. By hypothesis $\mathrm{dim}(R/\mathrm{Ann}_R(M))= 0$ this means that every prime ideal in $R/\mathrm{Ann}_R(M)$ (that is, every prime ideal of $R$ containing $\mathrm{Ann}_R(M)$) is a maximal ideal. Moreover, since $\mathrm{Ann}_R(M) \subseteq p_i$ for all $i$, we conclude that each quotient $M_i/M_{i-1}$ is a simple module, hence $M$ has finite length.
I'm having some trouble proving the other one.
Assume $M$ has finite length. Let’s show that there’s a finite product $P$ of maximal ideals such that $PM=0$.
If this is the case, then we have a surjection $R/P \rightarrow R/\mathrm{Ann}(M)$, thus $\dim{M}=0$ (because the only prime ideals of $R/P$ are maximal).
Indeed, $M$ has finite length, so there is a sequence $0=M_0 \subset M_1 \subset M_2 \ldots \subset M_r=M$ such that $M_i/M_{i-1}$ is simple: it is of the form $R/\mathfrak{m}_i$ for some maximal ideal $\mathfrak{m}_i$, and $P=\prod_i{\mathfrak{m}_i}$ fits the bill.