$f(0)=(f(0))^2 \Rightarrow f(0) \in \{0,1\}$. If $f(0)=0$, then $f(x) =0$ for every $x$, therefore $f(0)=1$.
For every $x \in \mathbb{R}$ one has $f(x)f(-x)=f(0)=1$ and $f(x)=(f(x/2))^2$, i.e. $f(x)>0$ for every $x \in \mathbb{R}$.
By induction one has $f(nx)=(f(x))^n$ for every $n \in \mathbb{N}$. Since $f(x)f(-x)=f(0)=1$, one has $f(-nx)=(f(nx))^{-1}=(f(x))^{-n}$ for every $n \in \mathbb{N}$. Hence $f(nx)=(f(x))^n$ for every $n \in \mathbb{Z}$.
For every $n \in \mathbb{Z}\setminus\{0\}$ one also has
$(f(x/n))^n=f(x)$, so $f(x/n)=(f(x))^{1/n}$. Setting $a=f(1)$ one has, for every $m/n \in \mathbb{Q}$:
$$
f(m/n)=(f(m))^{1/n}=[(f(1))^m]^{1/n}=a^{m/n}.
$$
Since $\mathbb{Q}$ is dense in $\mathbb{R}$, given $x \in \mathbb{R}$, there is a sequence $(x_k) \subset \mathbb{Q}$ such that $x_k \to x$ as $k \to \infty$, and by continuity one has
$$
f(x)=\lim_kf(x_k)=\lim_k a^{x_k}=a^x.
$$
One has $f'(x)=a^x\ln a$ for every $x$, and $2=f'(0)=\ln a$, i.e. $a=e^2$. Thus $f(x)=e^{2x}$ for every $x \in \mathbb{R}$.