Finite Haar Measure if and only if Compact

This is proved in NACHBIN, The Haar Integral, chapter II, Proposition 4. I'll rewrite his proof here:

Suppose $G$ is not compact. Choose $f:G\rightarrow\mathbb{R}$ continuous with compact support such that $0\leq f\leq 1$ and $\int_{G}fd\mu>0$. Let $K=\text{supp}(f)$, so $K$ is compact. Set $s_1=e$.

Suppose we already chose $s_1,\ldots,s_n\in G$ such that the sets $s_iK$ are parwise disjoint.

Notice that, since $\bigcup_{i=1}^n s_iK K^{-1}$ is (a finite union of compact sets, hence) compact, then there exists $s_{n+1}\in G\setminus\bigcup_{i=1}^n s_iKK^{-1}$. It is obvious that $s_{n+1}K$ is disjoint to all others $s_iK$.

Therefore, we obtain a sequence $s_1,s_2,\ldots$ such that $s_iK$ are pairwise disjoint. For every $n$, define the continuous function $f_n(t)=\sum_{i=1}^nf(s_i^{-1}t)$, so that $\text{supp}f_n=\bigcup_{i=1}^ns_iK$ and $f_n\leq 1$. Finally, $$0<n\int fd\mu=\int f_nd\mu\leq\mu(G),\qquad\text{for all }n=1,2,\ldots$$ so $\mu(G)=\infty$.Q.E.D.