In reply to Ksharp.

People much smarter than me have developed these MCMC techniques, so I feel confident that (if done correctly) they are correct. The integrals in the MCMC analyses are (I think) always distributions, not arbitrary functions. (I guess that is mostly a matter of scaling.) In the MCMC setting, there are certain assumptions that you need to verify. The estimates from the Markov chain are not independent, so you have to check the diagnostic plots to make sure the chains are long enough and sufficiently random. In many statistical applications, you don't need the value of the integral to very many decimal places because the standard errors of the estimates are much larger than the Monte Carlo error.

The doc for the MCMC procedure has an example of estimating an integral.