I would like to know, why:

If $X$ is a subspace of $ L^p(G)$ such that $\overline{X}\neq L^p(G)$, $\,$ then there exists $g\in L^q(G)$, $\frac{1}{p}+\frac{1}{q}=1$ such that $$\int_Gf(x)\,g(x)\,dx=0; \quad \forall f\in \overline{X}.$$ Where $G$ is a locally compact group with Haar measure $dx$.


Since $\overline{X}$ is a proper closed subspace of the Banach space $L^p(G)$, the quotient space $L^p(G)/\overline{X}$ is a nonzero Banach space. So there is some nonzero linear functional $\phi$ on $L^p(G)/\overline{X}$, whose composition with the quotient map is a nonzero linear functional on $L^p(G)$ that vanishes on $\overline{X}$. Finally that functional corresponds to some $g\in L^q(G)$ since $L^q$ is the dual of $L^p$.