Let $G$ be a locally compact group with unimodular Haar measure $\mu$. We consider the Hilbert space $\mathscr{H}:= L_{\mu}^2(G)$ together with the unitary representation $\pi : G \to U(\mathscr{H})$ given by $\pi(g): \mathscr{H} \to \mathscr{H}, f \mapsto f \circ r_g$, where $r_g$ is right multiplication by $g$. Hence $(\pi(g)f)(x) = f(xg)$.
We studies the following: For a continuous function $\varphi \in C_c(G)$ with compact support we define $$\pi(\varphi):= \int_G \varphi(g)\pi(g) \, d\mu(g).$$ More explicitly, for a measurable function $f: G \to \mathbb{C}$ we define $$(\pi(\varphi)f)(x) :=\int_G \varphi(g)f(xg) \, d\mu(x).$$
My question in now: Does this define a well defined representation of $C_c(G)$ on $\mathscr{H}$, where the problem is, that if $f \in L_{\mu}^2(G)$, then we need to show that $\pi(\varphi)f$ is in $L_{\mu}^2(G)$.
I doubt that this is true for a general $G$. However, I can prove the statement if $G$ is compact as follows: Note that if $G$ is compact, then $L_{\mu}^2(G) \subset L_{\mu}^1(G)$. Hence for $f \in L_{\mu}^2(G)$, \begin{align*} ||\pi(\varphi)f||_2^2 &= \int_G|(\pi(\varphi)f)(x)|^2 \, d\mu(x) \\ &= \int_G \bigg| \int_G \varphi(g)f(xg) \, d\mu (g) \bigg|^2 d\mu(x) \\ & \leq ||\varphi||_{\infty}^2 \int_G \bigg| \int_G f(xg) \, d\mu (g) \bigg|^2 d\mu(x) \\ &\leq ||\varphi||_{\infty}^2 \int_G ||f||_1^2 \,d \mu(x) \\ &= ||\varphi||_{\infty}^2 \cdot ||f||_1^2 \cdot \mu(G) < \infty. \end{align*} Where we used the invariance of the Haar measure in line 4. And the last term is less than infinity, since $\varphi$ is continuous of compact support and hence bounded, $L_{\mu}^2(G) \subset L_{\mu}^1(G)$ and hence for $f \in L_{\mu}^2(G)$ we have $||f||_1 < \infty$ and finally since $G$ is compact, the Haar measure is finite.
So the problem is can, one do a similar calculation if $G$ is not compact, or if one can find a counterexample.