prove $f\in L^2([0,1])$ Assume $f:[0,1]\to R$ is a measurable function such that $fg\in L^1([0,1])$ for all $g\in L^2([0,1])$.prove that $f\in L^2([0,1])$.

My opinion: if I can find a function g such that f+g is in $L^2([0,1])$, then use $$\int(f+g)^2-\int2fg+g^2$$to get $\int f^2$, then we can prove f is in $L^2([0,1])$. Is it right?
We may assume $f\geq 0$. We need to show that 
$$ \Lambda_f : g\in L^2 \mapsto \int f g \; dx $$
is a bounded linear functional on $L^2$. If this is the case then
by Riesz there is $h\in L^2$ so that $\Lambda_f(g)=\int hg \; dx$ and one sees that $f=h$ a.s.

So assume that $\Lambda_f$ is not bounded and let $g_n\geq 0$ be a sequence with $\|g_n\|_{L^2}=1$ so that $\Lambda_f(g_n) \rightarrow \infty$. Extracting a subsequence we may assume that $\Lambda_f(g_n) \geq 4^n$. Then
$$ g= \sum_{n\geq 0} \frac{1}{2^n} g_n$$ has $L^2$ norm not greater than $2$ but by monotone convergence $\Lambda_f(g)=+\infty$.
With $g=1\in L^2(0,1)$, the assumption gives $f \in L^1(0,1)$.

With $g= \sqrt{f}\in L^2(0,1)$, it now gives $f^{3/2}\in L^1(0,1)$, ie: $f \in L^{3/2}(0,1)$.

With $g=f^{3/4}\in L^2(0,1)$, it now gives $f^{7/4} \in L^1(0,1)$, ie: $f^{7/8} \in L^2(0,1)$.

etc.. by induction we have that $\forall n \geq 1, f \in L^{2-1/2^n}(0,1)$.

For $n\to \infty$, we get $f\in L^2(0,1)$.