Let $\mathcal{S}$ be a Schwartz space and $\delta_{a}$ the following distribution: $$\delta_{a}: \phi \rightarrow \phi(a) \ \ \ \ \text{ for each } \phi\in\mathcal{S}$$
Now, we routinely see something like: $$\int_{-\infty}^{\infty} f(x)\delta_a dx = f(a)$$
where $f$ is not necessarily $\in \mathcal{S}$ (e.g. $f \in L^2$). I'm having a hard time interpreting this integral using the language of distributions.
For example, if $f$ was in $\mathcal{S}$, I could say the integral is just giving me the value of the functional $\delta_a$ at a point in $\mathcal{S}$. But what about when $f\notin \mathcal{S}$?
It's an abuse of notation. Essentially it is defined by $$ \int_{-\infty}^\infty \delta(x)\varphi(x) \,dx := \langle \delta, \varphi\rangle $$ for $\varphi\in C^\infty_0(\Bbb R)$, where $\langle \delta, \varphi\rangle$ denotes the dual paring. Note that this actually makes sense for any $\varphi\in C^\infty(\Bbb R)$ since $\delta$ is a distribution of compact support (and even for $\varphi\in C(\Bbb R)$ because $\delta$ can be identified with a Radon measure).
Note that $\int_{-\infty}^\infty \delta(x)f(x) \,dx$ does not make sense for $f \in L^2(\Bbb R)$ since elements of $L^2$ are only defined an equivalent classes and $f(0)$ is not well-defined for $f\in L^2$.
I gave a more thorough answer to a very similar question here.