Let $\sum f_n(x) $ be uniformly convergent to $f(x)$ on $[a,b]$ where each $f_n$ is continuous on $[a,b]$. If $g: [a,b] \to \mathbb R$ be integrable on $[a,b]$, then $$\int_a^b f(x)g(x)dx = \sum \int_a^b f_n(x)g(x)dx.$$
we know that if $\sum f_n(x) $ be uniformly convergent implies $$\int_a^b f(x)dx = \sum \int_a^b f_n(x)dx.$$
If we can show that $\sum f_n(x)g(x)$ is uniformly convergent to $f(x)g(x)$. But how to proceed? will integration by parts help out here??
Since $g$ is integrable on $[a,b]$, then it is bounded. Thus, there exists a number $B>0$ such that $|g(x)|\le B$ for all $x\in[a,b]$. Now, we have
$$\begin{align} \left|\int_a^b \left(g(x)\sum_{n}^N\,f_n(x)-g(x)f(x)\right)dx\right|&\le\int_a^b \left|g(x)\sum_{n}^N\,f_n(x)-g(x)f(x)\right|dx\\\\ &=\int_a^b \,|g(x)|\,\left|\sum_{n}^N\,f_n(x)-f(x)\right|dx\\\\ &\le B\int_a^b \left|\sum_{n}^N\,f_n(x)-f(x)\right|dx \end{align}$$
Since the series $\sum_{n}f_n(x)$ converges uniformly to $f$, then for any given $\epsilon>0$ we can find a number $N'$ such that $\int_a^b \left|\sum_{n}^N\,f_n(x)-f(x)\right|dx <\frac{\epsilon}{B}$ whenever $N>N'$ .
And we are done!