As far as I'm not missing anything, splitting $f$ into two square roots should work:
Let $J\subseteq \mathbb R$ measurable. Assuming $f,g,h\colon J\to \mathbb R$ are (Lebesgue-)integrable and $0\leq f(x)$, we have that $\sqrt f g$ and $\sqrt f h$ are square-integrable, hence we can apply Cauchy-Schwarz as follows: \begin{align*}
{\left( \int_J f(x)g(x)h(x)\mathrm dx \right)}^2
&= {\left( \int_J \sqrt{f(x)}g(x)\sqrt{f(x)}h(x)\mathrm dx \right)}^2 \\
&\leq \int_J {\left( \sqrt{f(x)}g(x)\right)}^2 \mathrm dx
\int_J {\left( \sqrt{f(x)}h(x)\right)}^2 \mathrm dx\\
&= \int_J f(x)g(x)^2 \mathrm dx\int_J f(x)h(x)^2 \mathrm dx\\
\end{align*}
Note that in general, the square root is not integrable, but we only need the square integrability, since $(a,b)\mapsto \int_J a(x)b(x)\mathrm dx$ is a scalar product on $L^2(J,\mathbb R)$.