An example that $f,g$ is Riemann integrable on $[a,b]$, the range of $f$ is $[a,b]$, but $g\circ f$ is not Riemann integrable. I can easily find an example that $f,g$ is Riemann integrable but $g\circ f$ is not integrable, put $f(x)=R(x)=\begin{cases} \dfrac{1}{q}, & x=\dfrac{p}{q},\\ 0,& x\in\mathbf{Q}^{C}\end{cases}, g(x)=\begin{cases} 1, & x\neq 0,\\ 0, & x=0\end{cases}$, for example, then $g(f(x))$ is the Dirichlet function. 
However, if we add the condition 

the range of $f$ is $[a,b]$,

this is not so trival. I presume, we could construct a function $f$ with  Intermediate Value Property but non-continuous, then search for an appropriate $g$. 

Why not define:
$$f : [-1, 1] \to [-1, 1] : x \mapsto \begin{cases} 2x + 1 & \text{if } -1 \le x < 0 \\ \frac{1}{q} & \text{if } x \in [0, 1] \text{ and } x = \frac{p}{q} \text{ with } p, q \in \mathbb{Z} \text{ and } \operatorname{gcd}(p, q) = 1 \\ 0 & \text{if } x \in [0, 1] \setminus \mathbb{Q}\end{cases},$$
and $g$ as before, defined over $[-1, 1]$.
Then, if $g \circ f$ is Riemann integrable, then  $g \circ f|_{[0, 1]}$ ought to be Riemann integrable, but it too is just the Dirichlet function.
