# Integration with pdfs and cdfs

I was reading an article in econometrics when I stumbled upon an interesting thing. Essentially, what is done is this:

$$\int_\chi f(x)g(x)dx=\int_\chi f(x)dG(x)$$

where $x \in \chi$ and $G(x)=\int_{-\infty}^x g(t)dt$, i.e. the cdf of the pdf $g(x)$.

I discussed this with a friend, and while it helped a little I haven't completely understood this yet. What does it mean to integrate with respect to $G(x)$, and does this equality hold in general? I think what confuses me is that it's not $dx$ anymore and the implication of that. If someone could 'prove' (show) this, then I would be grateful.

-