Let $g$ be an integrable function on $[0,1]$ and let $1 \leq p < \infty$. Suppose there is a constant $M$ such that
$$ \left|\int f \;g \right| \leq M \; \|f\|_p $$ for all bounded measurable functions $f$.
Show that
a) $g \in L^q$ and
b) $||g||_q \leq M$ where $q$ is the conjugate number of $p$ (i.e. $1/p + 1/q =1$ ).
For a), I used Holder's inequality to obtain
\begin{align}\left|\int f \; g \right| &\leq \int |f \; g| \\ &= \|f \; g \|_1 \\ &\leq \|f\|_p \|g\|_q \end{align}
So $g \in L^q$. I am not sure how to bound $\|g\|_q $ by $M$. Is Riesz Representation Theorem used here?
You can indeed use the Riesz representation theorem to solve the problem. The hypothesis $$ \left| \int f g \right | \leq M \| f\|_{p}$$ shows in particular that the element $g$ defines a linear continuous functional $T_g$ on the space $L^{p}$ via the relation $$T_g(f) = \int f g.$$ Now, Riesz representation theorem tells you that there exists a unique $h \in L^{q}$ that represents the functional $T_g$ in the sense that $$T_g(f) = \int hf \hspace{0.9 cm} \text{for any $f \in L^{p}$.}$$ Moreover, the theorem states that $\|T_g\| = \|h\|_{q}$. From this you may deduce that $g=h$ and since you already have seen that $\|T_g\| \leq M$, you inmediately obtain that $\|g \| \leq M.$