Well, strictly speaking the integral equation doesn't fix $f(\pi)$, nor does it guarantee even the existence of $f'(x)$. For example, for arbitrary $\alpha$ be
$$f_\alpha(x) = \cases{
\alpha & for $x\in\pi\mathbb Q$\\
\cos x & otherwise}$$
Then $f_\alpha$ fulfills the integral equality, $f_\alpha(\pi)=\alpha$, and $f_\alpha$ is nowhere differentiable.
However if we add the requirement that $f$ is continuous, it is uniquely defined. By deriving both sides of the integral equation by $x$, we get
that $x f(x) = x\cos x$ must hold almost everywhere. Since the complement of a measure-zero set is dense (if it weren't, the measure zero set would contain an open interval, but open intervals have positive measure), continuity then fixes $f$ to be given by $f(x)=\cos x$ (note that the continuity requirement also fixes the value $f(0)$, which wouldn't even be fixed by $x f(x) = x\cos x$ if that equation needed to hold everywhere).
Obviously, if $f(x)=\cos x$, then $f(\pi)=-1$ and $f'(x)=-\sin x$.