Let $\pi_1$ , $\pi_2$ be cuspidal automorphic representations of ${\rm PGL}_2(\mathbb{R})$ of conductor $1$ and Hecke eigenvalues $\lambda_{\pi_{1, 2}}(n)$ , and let $h>0$ be an integer. For any smooth compactly supported weight functions $W_{1, 2}:\mathbb{R}^\times\to\mathbb{C}$ and any $Y>0$ , a spectral decomposition of the shifted convolution sum \[ \sum_{m\pm n=h}\frac{\lambda_{\pi_1}(|m|)\lambda_{\pi_2}(|n|)}{\sqrt{|mn|}} W_1\Big(\frac{m}{Y}\Big)W_2\Big(\frac{n}{Y}\Big) \] is obtained. As an application, a spectral decomposition of the Dirichlet series \[ \sum_{\substack{m,n\geq 1 m-n=h}} \frac{\lambda_{\pi_1}(m)\lambda_{\pi_2}(n)}{(m+n)^{s}} \Big(\frac{\sqrt{mn}}{m+n}\Big)^{100} \] is proved for $\mathfrak{R}s > 1/2$ with polynomial growth on vertical lines in the $s$ -aspect and uniformity in the $h$ -aspect