We present a new beam-shaping technique with an intracavity optically addressed liquid-crystal spatial light modulator. The Nd:YAG resonator is able to deliver beams with various spatial profiles such as flat-topped super-Gaussian and square-shaped beams.