Given the functional equation:
\[ f(x) + f(\pi - x) = \pi^2. \]Consider the given integral:
\[ I = \int_0^{\pi} f(x) \sin x \,dx. \]Using the substitution \( t = \pi - x \), we get:
\[ I = \int_0^{\pi} f(\pi - x) \sin (\pi - x) \,dx. \]Since \( \sin (\pi - x) = \sin x \), we obtain:
\[ I = \int_0^{\pi} f(\pi - x) \sin x \,dx. \]Adding both integrals:
\[ 2I = \int_0^{\pi} (f(x) + f(\pi - x)) \sin x \,dx. \]Substituting \( f(x) + f(\pi - x) = \pi^2 \):
\[ 2I = \pi^2 \int_0^{\pi} \sin x \,dx. \]Since \( \int_0^{\pi} \sin x \,dx = 2 \), we get:
\[ 2I = \pi^2 \times 0 = 0. \]Thus, \( I = 0 \).
Final Answer: \( \mathbf{0} \).