Jacob Manaker's answer is excellent, and since you seem to be after something purely algebraic this is the way to go. You can also directly show that $L^2(\mathbb R)$ with the defined multiplication satisfies the vector space axioms, but Jacob Manaker's answer is more elegant and has other applications.
However, given the natural Hilbert space structure of $L^2$, another interesting question is what kind of inner products we can endow this vector space with. Of course, any vector space can be equipped with inner products, but they are unlikely to have anything to do with the space's structure as a function space. So, a natural question arises: what does a suitable inner product look like? Note: for the remainder of this answer I will use $\alpha x$ to refer to regular multiplication by $\alpha\in\mathbb C$ and $\alpha\cdot x$ to refer to this newly defined multiplication.
The problem is in finding a space which can act as the analogue of $L^2(\mathbb R)\subset L^2(\mathbb C)$, or $\mathbb R^n\subset\mathbb C^n$. In other words, we need a $\mathbb R$-vector subspace $E\subset L^2(\mathbb R)$ such that $L^2(\mathbb R)=E\oplus i\cdot E$. I originally did not see the obvious example (and instead argued existence using the axiom of choice - see edit history for the details if you are interested, but it is a very standard Zorn's lemma argument), but after the OP's comment I have realized that taking $E$ to be the subspace of even functions will suffice. Indeed, for any $f\in L^2(\mathbb R)$,
$$f(x)=\underbrace{\left[\frac{f(x)}2+\frac{f(-x)}2\right]}_\text{even}+\underbrace{\left[\frac{f(x)}2-\frac{f(-x)}2\right]}_\text{odd}$$
and if $f$ is both even and odd, then clearly $f=0$. Moreover, $Hf$ is odd for any even $f$ and even for any odd $f$, which implies that $i\cdot E$ is the space of odd functions. To define an inner product is now quite natural: if $f=u_1+i\cdot v_1$ and $g=u_2+i\cdot v_2$ where $u_i,v_i\in E$ then define
$$\langle f,g\rangle:=\int(u_1u_2+v_1v_2)\,dx+i\int(v_1u_2-u_1v_2)\,dx.$$
Note that $\langle f,g\rangle=(\Phi(f)|\Phi(g))$, where $(\cdot|\cdot)$ is the standard inner product on $L^2(\mathbb C)$ and $\Phi(u+i\cdot v)=u+iv$ is linear, so it follows that this is indeed an inner product. Moreover, this inner product makes $L^2(\mathbb R)$ a Hilbert space. Indeed, suppose $(f_n)$ is Cauchy and write $f_n=u_n+i\cdot v_n$ where $u_n,v_n\in E$. Notice that $\langle f_n,f_n\rangle=\|u_n\|_2^2+\|v_n\|_2^2$, so both $\{u_n\}$ and $\{v_n\}$ are Cauchy sequences in $L^2$ (in the traditional sense). Since $E$ is a closed subspace of $L^2$, there exist $u,v\in E$ such that $u_n\to u$ and $v_n\to v$ in $L^2$. Put $f=u+i\cdot v$. Then
$$\langle f_n-f,f_n-f\rangle=\|u_n-u\|_2^2+\|v_n-v\|_2^2\to0,$$
so indeed $(L^2(\mathbb R),\langle\cdot,\cdot\rangle)$ is a Hilbert space.