We investigate the effect of pair creation on a shock structure . Particles , accelerated in the shock via the first order Fermi process , are supposed to cool by inverse Compton process on external soft photons , resulting in a cut-off power law shape of the particle distribution function . The high energy photons produced are thus able to create pairs , through photon-photon annihilation . The increase of the pair pressure may then be sufficient to modify the shock profile . We show that there is even a limit of the pair pressure ( of the order of 20 % of the ram pressure of the upstream flow ) above which the shock can not exist any longer . Conversely , significant changes of the flow velocity profile will also modify the spectral index and the high energy cut–off of the particle distribution function . Hence the number of particles able to trigger the pair creation process will change , modifying the pair creation rate accordingly . Taking into account these different processes , we self-consistently derive the flow velocity profile and the particle distribution function . We show that , in some region of the parameter space , the system can converge towards stationary states where pair creation and hydrodynamical effects balance . We discuss the application of this model to explain the high energy emission observed in compact objects . We show that hard X-ray spectra ( \alpha _ { X } < 1. ) are only obtained for small pair pressure and we don ’ t expect any strong annihilation line in this case . We suggest also a possible variability mechanism if the soft photon compactness depends itself on the pair density of the hot plasma , such as expected in reillumination models .