Does existence of the second weak derivative of $f\in L^2$ imply existence of the first?
Define $ f'(x) = \int_0^x f''(t)d t $, then $|f'(y)|\leq (\int _0^y |f''|^2 )^{1/2}\sqrt{y}\leq ||f''||_2 \sqrt{y}$.
Therefore $$\int\limits_{\mathbb{R}} f''(x) \phi (x) d x = -\int\limits_{\mathbb{R}} f'(x) \phi '(x) d x $$
And so $$\int\limits_{\mathbb{R}} f(x) \phi''(x) d x=-\int\limits_{\mathbb{R}} f'(x) \phi '(x) d x $$
This is clear if you look at the Fourier transform. If $f,f''\in L^2$ then $$\int|\hat f(\xi)|^2<\infty$$ and $$\int|\xi|^4|\hat f(\xi)|^2<\infty,$$and hence $$\int|\xi|^2|\hat f(\xi)|^2<\infty,$$because $|\xi|^2\le\max(1,|\xi|^4)$.