Solution
= Solution
The <fiber product of groups>
$$
E'=E\times_HG=\{(e,g)\in E\times G:\pi(e)=f(g)\}
$$
is a group under componentwise multiplication. The maps $m\mapsto(m,1)$ and $(e,g)\mapsto g$ give an exact sequence
$$
1\longrightarrow M\longrightarrow E'\longrightarrow G\longrightarrow1.
$$
The section $g\mapsto(s(f(g)),g)$ has extension cocycle
$$
(g,h)\longmapsto\phi(f(g),f(h))=(f^*\phi)(g,h).
$$
Therefore this pullback extension represents $f^*([\phi])\in H^2(G,M)$.