\begin{aligned}
\int_0^\pi x f(\sin x) dx &\overset{t=\pi - x}{=} \int_\pi^0 (\pi - t)f(\sin (\pi - t)) d(\pi - t) \\
&= \pi\int_0^\pi f(\sin (\pi - t)) dt - \int_0^\pi tf(\sin (\pi - t))dt \\
&= \pi \int_0^\pi f(\sin t)dt - \int_0^\pi tf(\sin t)dt \\
\Rightarrow \int_0^\pi xf(\sin x)dx = \frac{\pi}{2}\int_0^\pi f(\sin x)dx
\end{aligned}