This can be false when $k$ has characteristic $p$. For example, ${\mathbb{F}}_{4}\times {\mathbb{F}}_{4}$ cannot be generated by a single element over ${\mathbb{F}}_{2}$, because we would have ${\mathbb{F}}_{4}\times {\mathbb{F}}_{4}\cong {\mathbb{F}}_{2}[X]/p$ for some polynomial $p$. This can only happen if $p$ is the product of two distinct degree $2$ irreducibles, but there is only one degree $2$ irreducible over ${\mathbb{F}}_{2}$.

On the other hand, if $k$ has characteristic $0$, we can get around this problem. If $A$ is a finite product $\prod _{i}{K}_{i}$, we can write ${K}_{i}\cong k[X]/{p}_{i}$ for irreducible polynomials ${p}_{i}$. If the ${p}_{i}$ are distinct, then $A\cong k[X]/\prod _{i}{p}_{i}$, by the Chinese Remainder Theorem. If not, we can replace ${p}_{i}(X)$ by ${p}_{i}(X+n)$ for some $n\in \mathbb{Z}$. In characteristic $0$, these are all distinct polynomials, so we can ensure that $\prod _{i}{p}_{i}$ has no repeated factors.

Here is a proof in the more general case when $k$ is infinite: as above, we are done if we can show that there are infinitely many distinct polynomials among $\{{p}_{i}(X+a)\mid a\in k\}$. Suppose that there are only finitely many. By the pigeonhole principle, there must be an infinite set $S\subset k$ such that ${p}_{i}(X+a)={p}_{i}(X+b)$ for all $a,b\in S$.

But then ${p}_{i}(a)={p}_{i}(b)$ for all $a,b\in S$, so ${p}_{i}$ is constant, as a function, on an infinite subset of $k$, which can only happen if ${p}_{i}$ itself is constant.