Applying the product rule to the function $F=fg,$ we get $$F'(x)=f'(x)g(x)+f(x)g'(x).$$
According to the fundamental theorem of calculus, this gives us
$$\int_a^bF'(x)dx=F(x)\;\Rule{1px}{4ex}{2ex}^b_a= f(x)g(x)\;\Rule{1px}{4ex}{2ex}^b_a=\int_a^bf'(x)g(x)dx+\int_a^bf(x)g'(x)dx.$$
It follows
$$\int_a^bf(x)g'(x)dx=f(x)g(x)\;\Rule{1px}{4ex}{2ex}^b_a -\int_{a}^{b}g(x)f'(x)dx.$$