The Fundamental Theorem of Asset Pricing (FTAP) is invoked when we say the time $0$ price of a European option with payoff $g$ is $e^{-rT}E_Q(g(S_T))$, with the hypothesis that $e^{-rt}S_t$ is a $Q$-martingale. This martingale condition is satisfied if we assume $S_t$ follows a geometric Brownian motion with drift $r$, so we can use Monte Carlo to estimate the price as $$ e^{-rT}\frac{1}{N}\sum_{i=1}^N g(S_T^i) $$ where $\{S_T^i\}$ are lognormal.
Fair enough, but what permits one to do this same Monte Carlo estimation assuming $S_t$ follows the dynamics of the Heston model? In particular, under what conditions is $e^{-rt}S_t$ a martingale for some measure? We don't know the distribution of $S_t$ under this model, so it's not as straightforward as Black-Scholes. Certainly we can simulate the paths of this model and compute the sum above, which is what it seems people do, but what justifies this theoretically?