Yes. SurprisinglyEDIT: In an earlier version, I claimed erroneously that the following statement holds for general $\operatorname{Hom}(\prod_I \mathbb{Z}, \mathbb{Z})\cong \bigoplus_I \mathbb{Z}$$I$, so youand can dualizebe formally reduced to the corresponding statement for direct sumscase of countable $I$. I currently do not see how to perform that reduction. The argument also had some gaps, and then dualize backwhich I hopefully fixed now. So here's an argument for countable $I$:
For countable $I$, we have $\operatorname{Hom}(\prod_I \mathbb{Z}, \mathbb{Z})\cong \bigoplus_I \mathbb{Z}$. The key statement is that a homomorphism $\prod_I \mathbb{Z} \to \mathbb{Z} $ necessarily has "finite support", i. This can be reduced toe. there is a finite subset $I'\subseteq I$ such that $f$ factors through the caseprojection $I=\mathbb{N}$ with a retract argument$\prod_I \mathbb{Z}\to \prod_{I'}\mathbb{Z}$.
If that is not the case, and then proceeds by contradiction: one may assume $f(e_i)\neq 0$(identifying $I$ with $\mathbb{N}$) for all the "standard basis vectors"any $e_i$$n$, we find $v_n\in \prod_{\mathbb{N}} \mathbb{Z}$ with $v_n(i)=0$ for $i<n$ and $f(v_n)\neq 0$. But then looks at elements of the formwe may consider sequences $x_n = \sum_{i=0}^n a_i e_i$$a_i$ with $a_i|a_{i+1}$. In the product$a_i\mid a_{i+1}$, and form $x_\infty$$x_n = \sum_{i=0}^n a_i v_i$. Note this also makes sense, and for $f(x_\infty) = f(x_n)$$n=\infty$. Now observe that $f(x_n) = f(x_\infty)$ modulo $a_{n+1}$. By choosing, but if we inductively fix the elements $a_i$ inductively in a suitable way$a_n$, onewe may derive a contradiction (for example by arranging thatarrange for the absolute value of athe minimal representative of $f(x_n)$ modmodulo $a_{n+1}$ goes to diverge, leading to a contradiction. Simply pick $\infty$$a_n$ large enough so that $f(x_n)$ is larger than $f(x_i)$ for all $i<n$, and then ensure that additionally $|a_{n+1}| > 2|f(x_n)|$ when we pick $a_{n+1}$.
Why does this help? If $M$ is a retract of $\prod_I \mathbb{Z}$, then $\operatorname{Hom}(M,\mathbb{Z})$ is a retract of $\bigoplus_I \mathbb{Z}$, hence can't be given byfree, and so $\operatorname{Hom}(\operatorname{Hom}(M,\mathbb{Z}),\mathbb{Z})$ is a single integerproduct of copies of $f(x_\infty)$)$\mathbb{Z}$. In general, this does not agree with $M$, however, in this situation it does! We always have a natural transformation $M\to \operatorname{Hom}(\operatorname{Hom}(M,\mathbb{Z}),\mathbb{Z})$, let us call an abelian group "reflexive" if this is an isomorphism. The above argument shows that $\prod_I \mathbb{Z}$ is reflexive, and since retracts of isomorphisms are retracts, it follows more generally that every retract of $\prod_I \mathbb{Z}$ is reflexive.