$L^2(\mathbb{R})$ acted on by translation does decompose into a direct integral of one-dimensional representations. So in  general you have a direct integral if $G$ is not compact. You should look up type 1 groups, for various more complicated issues. The decomposition might not be unique otherwise.