One can use the same idea as in the proof of the Integral Chebyshev inequality (see for example "Theorem 3 (Chebyshev’s inequality)" in http://imar.ro/journals/Mathematical_Reports/Pdfs/2010/2/Niculescu.pdf):
The monotonicity of $f$ implies that
0 \le \bigl(f(g(x)) - f(g(y) \bigr) \cdot \bigl(g(x) - g(y) \bigr)
for all $x, y \in [a, b]$, and therefore
0 \le \int_a^b \int_a^b \bigl(f(g(x)) - f(g(y) \bigr) \cdot \bigl(g(x) - g(y) \bigr) \, dx dy \\
= 2 (b-a) \int_a^b f(g(x)) g(x) \, dx - 2 \left(\int_a^b f(g(x))\,dx\right)\left(\int_a^b g(x)\,dx\right) \, .
One can also see that equality holds if and only if equality holds
in $(*)$ for all $x, y \in [a, b]$ (since both function are assumed
to be continuous), and that is the case if and only if
$f$ is constant on $g([a, b])$.