We report on the formation of a dispersive shock wave in a nonlinear optical medium. We monitor the evolution of the shock by tuning the incoming beam power. The experimental observations for the position and intensity of the solitonic edge of the shock, as well as the location of the nonlinear oscillations are well described by recent developments of Whitham modulation theory. Our work constitutes a detailed and accurate benchmark for this approach. It opens exciting possibilities to engineer specific configurations of optical shock wave for studying wave-mean flow interaction.