Let $G$ be a retract of a product $\prod_I\mathbb{Z}$ of copies of $\mathbb Z$. This means there are group homomorphisms $\pi:\prod_I\mathbb{Z}\to G$ and $\sigma:G\to\prod_I\mathbb Z$ such that $\pi\circ\sigma=Id_G$. Is it true that $G$ must be a product of copies of $\mathbb Z$?
EDIT: As the partial answer by Achim Krause shows, the claim follows, once you know that
$$ \mathrm{Hom}\left(\mathbb{Z}^I/\mathbb{Z}^{(I)},\mathbb{Z}\right)=0. $$