[proofplan]
We identify every $k$-linear endomorphism of the one-dimensional [vector space](/page/Vector%20Space) $k$ with multiplication by a unique scalar. Since scalar multiplications commute, every one-dimensional representation has abelian image, so it annihilates the derived subalgebra $[\mathfrak g,\mathfrak g]$. This produces a unique functional on the quotient, and conversely every such functional defines a representation because the quotient is abelian.
[/proofplan]
[step:Identify $\operatorname{End}_k(k)$ with the abelian Lie algebra $k$]
For each scalar $c \in k$, define the $k$-[linear map](/page/Linear%20Map)
\begin{align*}
M_c: k &\to k \\
a &\mapsto ca.
\end{align*}
The map
\begin{align*}
M: k &\to \operatorname{End}_k(k) \\
c &\mapsto M_c
\end{align*}
is a $k$-linear isomorphism: if $T \in \operatorname{End}_k(k)$, then $T = M_{T(1)}$ because $T(a)=aT(1)$ for every $a \in k$.
The Lie bracket on $\operatorname{End}_k(k)$ is the commutator bracket
\begin{align*}
[A,B]_{\operatorname{End}} = A \circ B - B \circ A.
\end{align*}
For $c,d \in k$,
\begin{align*}
[M_c,M_d]_{\operatorname{End}} = M_c \circ M_d - M_d \circ M_c = M_{cd} - M_{dc} = M_0,
\end{align*}
since multiplication in the field $k$ is commutative. Hence $\operatorname{End}_k(k)$ is an abelian Lie algebra.
[/step]
[step:Send a one-dimensional representation to a functional on the abelianization]
Let
\begin{align*}
\rho: \mathfrak g &\to \operatorname{End}_k(k)
\end{align*}
be a Lie algebra representation on the one-dimensional vector space $k$. Define the scalar functional
\begin{align*}
\mu_\rho: \mathfrak g &\to k
\end{align*}
by the condition
\begin{align*}
\rho(x)=M_{\mu_\rho(x)}
\end{align*}
for every $x \in \mathfrak g$. This is well-defined and $k$-linear because $M:k\to \operatorname{End}_k(k)$ is a $k$-linear isomorphism and $\rho$ is $k$-linear.
Since $\rho$ is a Lie algebra homomorphism, for every $x,y \in \mathfrak g$,
\begin{align*}
M_{\mu_\rho([x,y])}
= \rho([x,y])
= [\rho(x),\rho(y)]_{\operatorname{End}}
= 0.
\end{align*}
Because $M$ is injective, $\mu_\rho([x,y])=0$ for all $x,y \in \mathfrak g$. Since $[\mathfrak g,\mathfrak g]$ is the $k$-linear span of such brackets, $\mu_\rho$ vanishes on $[\mathfrak g,\mathfrak g]$.
Define
\begin{align*}
\lambda_\rho: \mathfrak g/[\mathfrak g,\mathfrak g] &\to k \\
x + [\mathfrak g,\mathfrak g] &\mapsto \mu_\rho(x).
\end{align*}
This map is well-defined: if $x + [\mathfrak g,\mathfrak g] = x' + [\mathfrak g,\mathfrak g]$, then $x-x' \in [\mathfrak g,\mathfrak g]$, so
\begin{align*}
\mu_\rho(x)-\mu_\rho(x')=\mu_\rho(x-x')=0.
\end{align*}
Thus $\lambda_\rho$ is a $k$-linear functional on $\mathfrak g/[\mathfrak g,\mathfrak g]$.
[/step]
[step:Send a functional on the abelianization to a one-dimensional representation]
Let
\begin{align*}
\lambda: \mathfrak g/[\mathfrak g,\mathfrak g] &\to k
\end{align*}
be a $k$-linear functional. Define
\begin{align*}
\rho_\lambda: \mathfrak g &\to \operatorname{End}_k(k)
\end{align*}
by
\begin{align*}
\rho_\lambda(x)=M_{\lambda(\pi(x))}
\end{align*}
for every $x \in \mathfrak g$.
The map $\rho_\lambda$ is $k$-linear because $\pi$, $\lambda$, and $M$ are $k$-linear. It remains to check the Lie bracket condition. For $x,y \in \mathfrak g$, the element $[x,y]$ lies in $[\mathfrak g,\mathfrak g]$, so $\pi([x,y])=0$. Therefore
\begin{align*}
\rho_\lambda([x,y]) = M_{\lambda(\pi([x,y]))}=M_{\lambda(0)}=M_0.
\end{align*}
On the other hand, $\operatorname{End}_k(k)$ is abelian by the first step, so
\begin{align*}
[\rho_\lambda(x),\rho_\lambda(y)]_{\operatorname{End}}=0=M_0.
\end{align*}
Hence
\begin{align*}
\rho_\lambda([x,y])=[\rho_\lambda(x),\rho_\lambda(y)]_{\operatorname{End}}
\end{align*}
for all $x,y \in \mathfrak g$, and $\rho_\lambda$ is a Lie algebra representation.
[/step]
[step:Verify that the two constructions are inverse to each other]
Starting with a representation
\begin{align*}
\rho: \mathfrak g &\to \operatorname{End}_k(k),
\end{align*}
construct $\lambda_\rho$ as above and then construct $\rho_{\lambda_\rho}$. For every $x \in \mathfrak g$,
\begin{align*}
\rho_{\lambda_\rho}(x)
= M_{\lambda_\rho(\pi(x))}
= M_{\mu_\rho(x)}
= \rho(x).
\end{align*}
Thus $\rho_{\lambda_\rho}=\rho$.
Conversely, starting with a functional
\begin{align*}
\lambda: \mathfrak g/[\mathfrak g,\mathfrak g] &\to k,
\end{align*}
construct $\rho_\lambda$ and then form $\lambda_{\rho_\lambda}$. For every coset $x+[\mathfrak g,\mathfrak g] \in \mathfrak g/[\mathfrak g,\mathfrak g]$,
\begin{align*}
\lambda_{\rho_\lambda}\bigl(x+[\mathfrak g,\mathfrak g]\bigr)
= \lambda(\pi(x))
= \lambda\bigl(x+[\mathfrak g,\mathfrak g]\bigr).
\end{align*}
Thus $\lambda_{\rho_\lambda}=\lambda$.
The two assignments are inverse bijections. The displayed formula
\begin{align*}
\rho_\lambda(x)(a)=\lambda\bigl(x+[\mathfrak g,\mathfrak g]\bigr)a
\end{align*}
is exactly the definition of $M_{\lambda(\pi(x))}$ acting on $a \in k$, so the stated description of the action follows.
[/step]