As you have said, let $f$ we a weight $k$ form of nebentypus $\chi$. Then in particular, $f(\gamma z) = (cz + d)^k \chi(d) f(z)$, where $\gamma = \left(\begin{smallmatrix} a&b\\c&d \end{smallmatrix}\right)$ is a matrix in our congruence subgroup du jour.
Notice that $\lvert f(z) \rvert^2 y^k$ is invariant under the slash operator, as
$$ \begin{align}
\lvert f(\gamma z) \rvert^2 (\gamma y)^k &= f(\gamma z) \overline{f(\gamma z)} \frac{y^k}{\lvert cz + d \rvert^{2k}} \\
&= (cz+d)^k \overline{(cz + d)^k} \chi(d) \overline{\chi(d)} f(z) \overline{f(z)} \frac{y^k}{\lvert cz + d\rvert^{2k}} \\
&= \lvert f(z) \rvert^2 y^k.
\end{align}$$
This means that it is meaningful to take the inner product against the normal Eisenstein series
$$ E(z,s) = \sum_{\gamma \in \Gamma_\infty \backslash \Gamma_0(N)} \text{Im}(\gamma z)^s.$$
Performing an unfolding of the integral along the critical strip, we can see that
$$ \langle \lvert f \rvert^2 y^k, E(z,s) \rangle = \frac{\Gamma(s + k - 1)}{(4 \pi)^{s + k - 1}} \sum_n \frac{a(n)^2}{n^{s + k - 1}},$$
where $a(n) = \lambda(n)n^{(k-1)/2}$ are the Fourier coefficients of $f$. Notice the sum on the right is the Rankin-Selberg $L$-function, and I deliberately avoid indicating any normalization anywhere.
As we understand the analytic behaviour of the Eisenstein series and the $\Gamma$ function, we can understand the analytic behavior of the $L$-function. Most importantly, since the Eisenstein series has a single pole at $s = 1$ of known residue, we understand the pole of the $L$-function, and it has residue
$$ \langle fy^{k/2}, fy^{k/2} \rangle R \frac{(4\pi)^k}{\Gamma(k)},$$
where $R$ is the residue of the Eisenstein series attached to the congruence subgroup (and often looks something like $\frac{3}{\pi}$).