Suppose $h : [a,b]\to\mathbb{R}$ is a continuous function and $$ \int_{a}^{b}h(x)g'(x)dx = 0$$ for all $g \in \mathcal{C}^{1}[a,b]$ with $g(a) = g(b) = 0$. Show that $h$ must be a constant function.
I have used integration by parts to achieve
$$ 0 = \int_{a}^{b}h(x)g'(x)dx = -\int_{a}^{b}h'(x)g(x)dx $$
but am not sure what this means or if it is even a relevant approach. I look forward to any hints or tips.