Adaptive optics provides a real time compensation for atmospheric turbulence which severely limits the resolution of ground-based observation systems. The correction quality relies on a key component: the wavefront sensor. An adaptive optics system in the mid-IR providing high spatial resolution for ground-to-air applications has been designed at ONERA and is currently integrated. It includes an IR Shack-Hartmann wavefront sensor operating on an extended source. This paper describes and justifies the design of the IR wavefront sensor. First images and tests with the Shack-Hartmann wavefront sensor camera are presented.