Contractibility of the space of sections of a fiber bundle
Solution 1:
I first give a solution in the context of CW-complexes, topological bundles and continuous sections. In this setting, using contractibility of the fibers and induction on skeleta, one constructs a (continuous) section $$ s: M\to E $$ of the bundle. Next, again using contractibility of the fibers and induction on skeleta, one constructs a (continuous) map $$ f: E\times [0,1]\to E $$ such that $f(x,0)=x, f(x, 1)=s(\pi(x))$ and $\pi\circ f(x,t)=\pi(x)$ for every $x$ and $t$. Using the map $f$ one defines a contraction $F$ on the space $\Gamma=\Gamma(M,E)$ of (continuous) sections by the formula $$ F(\sigma(m),t)=f(\sigma(m), t), m\in M, t\in [0,1] $$ for sections $\sigma: M\to E$. Clearly, $F$ is continuous on the product $\Gamma\times [0,1]\to \Gamma$ and $F(\sigma, 0)=\sigma, F(\sigma, 1)=s$. Thus, $\Gamma$ is indeed contractible.
Now, to the smooth case. There is an approximation procedure for continuous sections via smooth sections described in Section 6.7 of Steenrod's "The Topology of Fibre Bundles". Using this approximation scheme, one can replace "continuous" with "smooth" in the a above proof provided that $\pi$ is a smooth fiber bundle.