Regarding partitions of unity: Every locally compact group is paracompact, thus it is normal, thus there exist partitions of unity. But you do not need this argument: For general locally compact groups and any compact subset $A$ and any finite precompact open cover of $A$ there exists a continuous function with the value $1$ on $A$ and vanishing outside the union of the cover which can be written as the sum of continuous functions supported on the elements of the cover (Folland, *Real Analysis*, page 134). You use the cover described in the comment by Lee and then you take these functions given by the theorem and multiply them with the function $f$ (the proof uses the Alexandrov compactification which is compact, thus it is normal).

First I thought you were only interested in an approximation (because you had mentioned Stone Weierstraß), for an approximation you can use this proof:
If $\mathcal{U}$ is a local basis at identity consisting of compact sets and $(f_U)_{U\in \mathcal{U}}$ is any family of continuous, non-negative, symmetric functions such that $\int_G f_U=1$ and $\mathrm{supp}(f_U)\subset U$ for all $U\in \mathcal{U}$, then $(f_U)_{U\in \mathcal{U}}$ is an *approximate identity* for the convolution algebra of compactly supported continuous functions (reference: Gerald B. Folland, *A Course in Abstract Harmonic Analysis*, proposition 2.42). Since convolutions can be approximated by finite linear combinations of left-translates of the functions, we get your result.