Structure theorem for finite dimensional algebras $\DeclareMathOperator{\Spec}{Spec}$
I am self-studying commutative algebra and I would like to have my proof verified. In what follows, all rings are assumed to be commutative and have a multiplicative unit.
The claim I intend to prove is the following:

Let $k$ be a field, and let $R$ be a commutative $k$-algebra, finite dimensional over $k$. Then $R$ has only finitely many prime ideals, each of which is maximal, and the canonical ring maps induces an isomorphism $R\to R_P$ $$R\cong \prod_{P\in\Spec R}R_P$$ of rings.

My proof is posted as an answer. Any critique/suggestion/comment/better proof is welcome. Thanks in advance.
 A: $\DeclareMathOperator\Spec{Spec}$
$\DeclareMathOperator\Ann{Ann}$
As pointed out in the comments by Alex, there is a more general setting in which the claim holds. By definition, Artinian rings refers to rings satisfying the descending chain condition(DCC) on ideals. Note that every finite-dimensional algebra over a field is Artinian for dimensional reasons.
Lemma. Every Artinian ring is Noetherian.
(proof.) Let $R$ be an Artinian ring, and suppose it is not Noetherian. Let $I\subset R$ be an ideal minimal among those that are not finitely generated. We claim that $P=\Ann_{R}(I)$ is a prime ideal. Given any $a\in R$, we can form an exact sequence$$0\to K\to I\xrightarrow{a\cdot}aI\to0,$$where $K$ is the kernel of the multiplication map $a\cdot:I\to aI$. If $aI\neq I$, then $aI$ is finitely generated, so $K$ cannot be finitely generated. By minimality of $I$, this means $K=I$. Thus $aI=0$. So we have either $aI=I$ or $aI=0$. This is enough to conclude that $P$ is prime.
It follows that $R/P$ is an artinian domain, i.e., a field. As an $R/P$-vector space, $I$ is infinite-dimensional. Thus $I$ contains a proper infinite-dimensional subspace, which is an ideal properly contained in $I$ that is not finitely generated, a contradiction.$\square$
Theorem. (Structure Theorem for Artinian Rings) If $R$ is an Artinian ring, then it has only finitely many primes, each of which is maximal, and $R$ is isomorphic to $\prod_{P\in\Spec R}R_P$ as rings.
(proof.) Since every Artinian domain is a field, every prime in $R$ is maximal.
To show that there are only finitely many primes, suppose there existed
infinitely many primes $P_{1},P_{2},\cdots$. Since each $P_{i}$
is maximal, $\{P_{i}\}_{i}$ is pairwise comaximal, so by CRT we have
$R/\bigcap_{i=1}^{n}P_{i}\cong R/P_{1}\times\cdots\times R/P_{n}$.
In particular, for each $n$ there is $r\in R$ such that $r\in\bigcap_{i=1}^{n}P_{i}\setminus P_{n}$,
so the chain $\{\bigcap_{i=1}^{n}P_{i}\}_{n=1}^{\infty}$ violates
the DCC. Hence $\Spec R$ is finite.
Next, let $J$ denote the Jacobson radical of $R$. By DCC we have
$J^{n}=J^{n+1}$ for some $n$. Since Artinian rings are Noetherian,
$J^{n}$ is finitely generated, and hence Nakayama's lemma shows $J^{n}=0$.
Therefore by CRT we have
$$
R\cong\prod_{P\in\Spec R}\frac{R}{P^{n}}.
$$
By taking $n$ large enough, we may
assume $P^{n}=P^{n+1}$ for all $P\in\Spec R$ (because of DCC and because $\Spec R$ is finite). Then $(PR_{P})^{n}=(PR_{P})^{n+1}=(PR_{P})(PR_{P}^{n})$.
Since $(R_{P},PR_{P})$ is local and $(PR_{P})^{n}$ is finitely generated
as an $R_{P}$-module (because $R_{P}$ is Noetherian since $R$ is
Noetherian), Nakayma's lemma shows that $(PR_{P})^{n}=0$. Therefore
$$
R_{P}=\frac{R_{P}}{(PR_{P})^{n}}=\frac{R_{P}}{P^{n}R_{P}}\cong\left(\frac{R}{P^{n}}\right)_{P}
$$
as rings. Now since $P$ is maximal, given any $u\in R\setminus P$
we can find $v\in R\setminus P$ such that $uv+1\in P$. Then $(uv+1)^{n}\in P^{n}$.
Expanding the LHS we find that $ua+1\in P^{n}$ for some $a\in R$, so $u$ acts as a unit in $R/P^{n}$. Hence
$(R/P^{n})_{P}\cong R/P^{n}$ as rings. Thus $R_{P}\cong R/P^{n}$
as rings. The claim follows. $\square$
