Laser beam shaping requires controlling the intensity and phase profile of the input laser beam simultaneously. In this paper, a method for designing double freeform surfaces is presented to solve the laser beam shaping problem. Based on Snell's law and conservation law of energy, a mathematical model is established to convert the double surfaces design problem into an elliptic Monge-Ampè re equation with a nonlinear boundary problem by imposing a constraint on the optical path length between the input and output wavefronts. Two different configurations of the beam shaping system are discussed and the good results show clearly the Monge-Ampè re equation method provides an effective tool in solving the challenging problem of laser beam shaping.