Let me see if I remember correctly. To be the Levi Civita connection, the connection forms must satisfy the following equations:
TorsionLess
$$\mbox{d}\theta^{i}={\sum}\theta^{j}\wedge\theta_{j}^{i}$$
Compatibility with the metric
$$\mbox{d}g_{ij}={\sum}\left(\theta_{i}^{k}g_{kj}+\theta_{j}^{k}g_{ki}\right).
$$
I think Cartan structure equations gives you the first condition and not the second.
I'll explain everything with a concrete example you can then generalize easily. Let us consider the Heisenberg group. We have that the Maurer Cartan form is given by
$$A^{-1}\mbox{d}A=\left(\begin{array}{ccc}
0 & 1 & 0\\
0 & 0 & 0\\
0 & 0 & 0
\end{array}\right)\mbox{d}x+\left(\begin{array}{ccc}
0 & 0 & 1\\
0 & 0 & 0\\
0 & 0 & 0
\end{array}\right)\left(\mbox{d}y-x\mbox{d}z\right)+\left(\begin{array}{ccc}
0 & 0 & 0\\
0 & 0 & 1\\
0 & 0 & 0
\end{array}\right)\mbox{d}z,$$ so we have that the invariant forms are
$$\theta^{1}=\mbox{d}x, \theta^{2}=\mbox{d}y-x\mbox{d}z, \theta^{3}=\mbox{d}z. $$
If we apply the external derivative we obtain
$$\mbox{d}\theta^{1} =0,$$
$$\mbox{d}\theta^{2} =-\mbox{d}x\wedge\mbox{d}z=-\theta^{1}\wedge\theta^{2},$$
$$\mbox{d}\theta^{3} =0.$$
The dual vectors of theinvariant differential form $\theta^{1}$, $\theta^{2}$ and $\theta^{3}$ are the vectors
$$\tilde{E}_{1} = \frac{\partial}{\partial x},$$
$$\tilde{E}_{2} = \frac{\partial}{\partial y},$$
$$\tilde{E}_{3} = x\frac{\partial}{\partial y}+\frac{\partial}{\partial z}. $$
So in the moving frame $ \left\{ \tilde{E}_{1},\,\tilde{E}_{2},\,\tilde{E}_{3}\right\} $ we have that $\left(g_{A}\right)_{ij}$ is the identity and then the equations for the compatibility with the metric (if we want to find the Levi Civita Connection) are
$$\omega_{j}^{i}+\omega_{i}^{j}=0.$$
Then from the structure equations we have
$$\mbox{d}\theta^{1}= 0 =\left(\mbox{d}y -x\mbox{d}z\right)\wedge\omega_{2}^{1}+\mbox{d}z\wedge\omega_{3}^{1},$$
$$\mbox{d}\theta^{2}= -\mbox{d}x\wedge\mbox{d}z =-\mbox{d}x\wedge\omega_{2}^{1}+\mbox{d}z\wedge\omega_{3}^{2},$$
$$\mbox{d}\theta^{3}= 0 =-\mbox{d}x\wedge\omega_{3}^{1}-\left(\mbox{d}y-x\mbox{d}z\right)\wedge\omega_{3}^{2}.$$
If we solve we then find the connection forms
$$\omega_{2}^{1} =-\omega_{1}^{2} =\frac{1}{2}\mbox{d}z=\frac{1}{2}\theta^{3},$$
$$\omega_{3}^{2} =-\omega_{2}^{3} =\frac{1}{2}\mbox{d}x=\frac{1}{2}\theta^{1},$$
$$\omega_{3}^{1} =-\omega_{1}^{3} =\frac{1}{2}\left(\mbox{d}y-x\mbox{d}z\right)=\frac{1}{2}\theta^{2}.$$
And then you have the curvature forms
$$\Omega_{2}^{1}= \theta_{3}^{1}\wedge\theta_{2}^{3} =\frac{1}{4}\theta^{1}\wedge\theta^{2},$$
$$\Omega_{3}^{2}= \theta_{1}^{2}\wedge\theta_{3}^{1} =\frac{1}{4}\theta^{2}\wedge\theta^{3},$$
$$\Omega_{3}^{1}= -\frac{1}{2}\theta^{1}\wedge\theta^{3}+\theta_{2}^{1}\wedge\theta_{3}^{2} =-\frac{3}{4}\theta^{2}\wedge\theta^{3}.$$
And at the end the Riemann coefficients
$$R_{212}^{1} = \frac{1}{4},$$
$$R_{323}^{2} = \frac{1}{4},$$
$$R_{323}^{1} = -\frac{3}{4}.$$
Although I have not before seen Darboux’s name on this, this is a standard construction in differential geometry and applications of this together with the Frobenius integrability theorem go back certainly to E. Cartan. For a beautiful discussion, I recommend "On Cartan's Method of Lie Groups and Moving Frames as Applied to Uniqueness and Existence Questions in Differential Geometry," by Phillip Griffiths (Duke Math J. 41(4)(1974), pp. 775-814.
You can also find discussions in Spivak's Differential Geometry, Chern/Chen/Lam Lectures on Differentail Geometry, and numerous other places.
A typical example is the Fundamental Theorem of Surface Theory. One can prove existence/uniqueness (up to rigid motion) of a surface in $\Bbb R^3$ with prescribed first and second fundamental forms exactly by observing that the integrability conditions are given by pulling back the Maurer-Cartan form on $SO(3)$ to the frame bundle of the surface.
Best Answer
There are various proofs in textbooks. My favorite proof is to use E. Cartan's graph trick and the Frobenius Theorem.
As you stated it, things aren't quite right. You need $M$ connected.
If $\omega^1,\dots,\omega^n$ are $n$ basis left-invariant forms (so we pick a basis for $\mathfrak g^*$ and pull back by $L_g$), consider the differential ideal generated by the $1$-forms $$\eta^i = f_1^*\omega^i-f_2^*\omega^i.$$ Conceptually, we're looking at the map $F=(f_1,f_2)\colon M\to G\times G$ and pulling back the forms $\phi^i=\pi_1^*\omega^i - \pi_2^*\omega^i$ by the product map. The differential system $\phi^1=\dots=\phi^n=0$ is completely integrable, since $$d\phi = \pi_1^*[\omega,\omega] - \pi_2^*[\omega,\omega] = [\phi,\pi_1^*\omega] + [\pi_2^*\omega,\phi] \equiv 0 \pmod\phi.$$ Indeed, integral manifolds of $\phi^i=0$ give left cosets of the diagonal subgroup $\Delta\subset G\times G$. Since $F^*\phi^i = 0$ by hypothesis, and since $M$ is connected the image of $F$ must be contained in one of those integral manifolds, which says that $f_1=gf_2$ for some $g\in G$.