I think it's false, but I'm not 100% confident about this construction: let $g$ be a continuous function which takes the value zero on a nowhere dense set of positive measure $E$ but nonzero values on a dense subset of the complement of $E$. Let $f$ be a function which is continuous except for a discontinuity at zero. Then $f(g)$ cannot be Riemann integrable by Lebesgue's characterization, since it is discontinuous on a set of positive measure.
On the other hand I believe the result is true for $g$ monotonic by a standard argument about uniform continuitysince it is possible to find the preimage of any partition. More generally it is true for $g$ which "changes direction" finitely often. The problem is when $g$ oscillates too wildly.
Edit: I still don't know if the above works (I'm a little suspicious about whether $g$ exists), but an explicit counterexample is given by Jitan Lu in this AMM article. The counterexample seems to be similar in spirit; Lu constructs a fat Cantor set to do it.

