We prove by elementary scheme-theoretic methods the following classical result:
CLAIM: Let $A$ be an artinian ring with maximal ideals $\mathsf{Spec} \, A=\lbrace \mathfrak m_1,\ldots,\mathfrak m_N\rbrace$. Then there is an isomorphism $$A\simeq \prod_{i=1}^NA_{\mathfrak m_i}.$$
PROOF: Let $X=\mathsf{Spec} \, A$. denote by $\mathcal{O}_X$ its structure sheaf. Since $X$ is discrete, by the gluing axiom, we have $$A\simeq \mathcal{O}_X(X)=\prod_{i=1}^N\mathcal{O}_X(\mathfrak m_i),$$ but $\mathcal{O}_X(\mathfrak{m}_i)\simeq A_{\mathfrak m_i}$.