I do not think this is true,
but at the same time I am not sure.
I know that if we assume that f is continuous instead of integrable then this statement is true. I just do not know how to provide a counterexample if it is false to show that this is wrong. Integrable does not imply continuity I know that much.
Here is a counterexample using Lebesgue integration.
Let $f=\chi_{\Bbb Q\cap [a,b]}$. Then $f$ is $0$ a.e. , hence Lebesgue integrable. Next for any Lebesgue integrable $g$ we have $fg=0$ a.e. so that $fg$ is Lebesgue integrable and $\int_a^b fg=0$ . But $f$ is not identically zero in $[a,b]$.