Let $f$ and $h$ be densities on $\mathcal{X}$ with $\operatorname{supp}(f) \subset \operatorname{supp}(h)$, and let $X_1^*, \ldots, X_N^*$ be i.i.d. from $h$. Then
\begin{align*}
\frac{1}{N} \sum_{i=1}^N \frac{g(X_i^*) f(X_i^*)}{h(X_i^*)} \xrightarrow{a.s.} \mathbb{E}_f[g(X)].
\end{align*}