In this paper, we show that a diffractive optical element can be used as a mode-synthesizing mirror (MSM) inside a Nd: YAG laser cavity. In our experiment, we have chosen to produce a laser mode that has a square shape at the output mirror with a profile in the x and y directions given by a super-Gaussian of order twenty. This is very close to the top-hat profile required for many applications. The mode-synthesizing mirror was designed by calculation the near-field diffraction pattern of this square top-hat mode at the MSM surface. The phase of the MSM was chose to return the phase conjugate of this calculated diffraction pattern. The MSM phase function was then converted into a multi-level diffractive optical element by performing a modulo-2π operation on the phase data and quantizing it into sixteen phase levels. In conclusion, we have demonstrated a technique for customizing laser modes in a NdLYAG laser. These techniques are directly applicable to diode-pumped solid state lasers, and may be particularly useful for transverse pumping and slab pumping geometries where high model discrimination is required.