I have been thinking about this for the last few days but I was not able to produce a definitive answer.

Take an integrable function $g$ that maps in $\mathbb{R}$ and with domain contained in $[0,M]$ (not necessarily equal to this interval). Consider now a family of probability measures $\mu_{\theta}$ such that $\mu_{\theta} \ll \lambda$ (Lebesgue measure) for every $\theta$. These measures have strictly positive density $f_{\theta}(z) > 0 \: \: \forall \: 0 \leq z < \theta \leq M$. The densities are not defined for $z \geq \theta$.  In symbols:

$$ \mathcal{M}_{\lambda} = \bigg\{ \mu_{\theta} \: : \: \theta \in [0,M] \: \: \text{and} \: \: \frac{d\mu_{\theta}}{d\lambda} = f_{\theta} \: : \: f_{\theta}(z) > 0 \: \: \forall \: 0 \leq z < \theta \leq M, \:\forall \: \theta \in [0,M] \bigg\}$$

**Question:** is it true that:

$$ 0 = \int_{0}^{\theta} g(z) d \mu_{\theta} (z) = \int_{0}^{\theta} g(z) \underbrace{f_{\theta}(z)}_{> 0} dz  \: \: \: \: \: \: \: \forall \: \theta \in [0,M] \: \: \: \: \: \: \stackrel{?}{\implies} \: \: \: \: \: \: g(z) = 0 \: \: \: \: \: \: \: \text{a.e. for} \: z \in [0,M]$$

As an example, you can take as $f_{\theta}(z) = \frac{\mathbb{1}_{[0,\theta)}(z)}{2 \sqrt{\theta^2 - \theta z}}$ for fixed $\theta$.

**Intuition:** I think the claim is true because the condition is true for every $\theta$ and thus can be thought as a "scanning condition". I.e. we are scanning $g$ over the whole interval $[0,M]$ by moving the $\theta$'s. Moreover, the density is always strictly positive so this makes the "scanning" meaningful.

**Proposal:** I have at the moment a proof of this statement that assumes that $g$ is continuous and have finitely many zeros. Basically I use the finitely many zeros assumption to say that $g$ cannot have infinitely many fluctuations from above to below zero and then I consider each one of these finitely many neighborhoods where $g$ is strictly positive or strictly negative (by continuity) and I show via contradiction that on that neighborhood actually $g$ must be $0$ because otherwise, we can find a $\theta$ in the middle of a such neighborhood so that the integral is nonzero. Therefore I would like to know if the claim holds more generally for not continuous functions. Or for all continuous functions, not necessarily with finitely many zeros.

Any help is extremely appreciated!