Characterize semisimple rings of quotients

Problem

Let $K$ be a field. Characterize all polynomials $f\in K[X]$ such that $R=K[X]/\langle f\rangle$ is a semisimple ring.

I know two equivalent definitions of semisimple modules but I am not so sure if they are useful for this exercise: a module is semisimple if it is a direct sum of simple submodules and, equivalently, if every submodule is a direct summand. I couldn't arrive to anything using these two definitions, maybe there is another property of semisimple rings or semisimple modules which could help with this problem, any suggestions would be appreciated.

Let $f$ be a polynomial in $K[x]$. Decompose $p$ into irreducible factors like $f=p_1^{e_1}\cdots p_r^{e_r}$ with $p_i$ irreducible and $e_i\ge 1$. Then, by CRT we get $K[x]/(f)\simeq k[x]/(p_1^{e_1})\times\cdots\times k[x]/(p_r^{e_r})$. If $e_i=1$ for all $i$, then $K[x]/(f)$ is isomorphic to a direct product of fields (since $K[x]/(p)$ is a field whenever $p$ is irreducible). If some $e_i>1$, then $k[x]/(p_i^{e_i})$ can't be contained in a (finite) direct product of fields (why?), and thus we can conclude:
$K[x]/(f)$ is semisimple iff $f$ is a product of mutually distinct irreducible factors.
• Sorry to bother you with this a month later but I came to this problem again and rereading your solution I've realized I don't get why $k[x]/({p_i}^{e_i})$ can't be contained in a finite direct product of fields (for $e_i>1$). Could you help me with that? – user156441 Dec 12 '14 at 3:12