As long as both functions are integrable, the distinction technically doesn't matter because you could use methods like Metropolis-Hastings that are not sensitive to the normalizing constant.
However, this is a misleading thing to do. Typically, you've got some function, let's say it is $f(x)$, and you want to compute a probability integral of $f(x)$ to get its expectation under some probability distribution $P(x)$ which has a density function of $p(x)$. In the case where you know what you want the expectation of, it would be harmful to represent $f$ as the distribution and $P$ as the thing-you're-taking-expectation-of.
Then, really you're secretly doing a Stieltjes integral of the form $E[f]_{P} = \int f(x)d[P(x)].$ As a matter of convenience for almost any distribution of practical interest, this simplifies to $E[f]_{P} = \int f(x)p(x)dx.$
And so, if you can draw the $x$ values in such a way that you can guarantee that they follow the distribution $P(x)$, then you can approximate this integral with the sample mean: $ E[f]_{P} \approx \frac{1}{N}\sum_{i=1}^{N} f(x_{i}),$ adjusted for different domains of integration, of course.
Added: To reflect the comments.
It won't be mathematically incorrect if you just use merely integrable $P(x)$ and $f(x)$. You can conceptually think of Monte Carlo as a generic procedure for computing the Stieltjes integral of some function with respect to some other function, as long as the function that appears in the differential satisfies the monotonicity type conditions needed for Stieltjes integrals.
The reason why this may not be a great way to present it is (a) in practice this will almost always reduce to a probability calculation, because the random sampling procedures will draw $x_{i}$ values in accordance with probability distributions that are proportional to the Stieltjes function you care about, and thus you'll have to know that function's normalizing constant in order to correct for this if you really wanted the Stieltjes integral and not the probability integral; and (b) Any Stieltjes integral that you're attempting to solve numerically must inherently reduce down to a Riemann integral anyway, and so why bother making the distinction between Monte Carlo for general Riemann integrals vs. Monte Carlo for Stieltjes integrals?