Holder's Theorem is the following: Let $E\subset \mathbb{R}$ be a measurable set. Suppose $p\ge 1$ and let $q$ be the Holder conjugate of $p$ - that is, $q=\frac{p}{p-1}.$ If $f\in L^p(E)$ and $g\in L^q(E),$ then $$\int_E \vert fg\vert\le \Vert f\Vert _p\cdot\Vert g \Vert_q$$
I am trying to prove the following partial converse is true. Suppose $g$ is integrable, $p>1$ and $$\int_E \vert fg\vert\le M\Vert f\Vert_p$$ when $f\in L^p(E)$ is bounded, for some $M\ge0$. I am trying to prove that this implies that $g\in L^q(E)$, where $q$ is the conjugate of $p$. I am interested in knowing if my proof is correct or if it has any potential.
Attempt: Assuming this is true, I want to show $\int_E \vert g\vert^q<\infty$. Note that $g^{q-1}\in L^p(E)$ since $\int_E \vert g\vert^{pq-p}=\int_E \vert g \vert ^q<\infty$ (I think this is true since $g$ is integrable - I know it holds when $q$ is a natural number). Take $f=g^{q-1}$ and the hypothesis tells us that $$\int_E \vert g \vert^q\le M\Vert g^{q-1}\Vert_P\\<\infty \,\,(\text{since }g^{q-1}\in L^p)$$so $g$ is integrable.

This is not a correct proof. You want to show that $\int_E |g|^q < \infty$, but then you are using this in the proof. So nothing has been shown.
To write a correct proof, you will have to approximate $g$, as you wrote in your last comment. E.g.set $E_k = E \cap B_k(0)$ (so these sets now have finite measure) and $$ g_k(x) = \begin{cases} g(x) \quad (x \in E_k, |g(x)| \le k) \\ 0 \quad \text{otherwise} \end{cases} $$ Clearly $\int_E |g_k|^q < \infty$ for all $k$. Now use the assumption and a suitable limit, e.g. with Lebesgue's Theorem.