We demonstrate a new method for high resolution patterning of the facets of a nonlinear crystal, LiB3O5, based on lithographic exposure of its anti-reflection coating layer, followed by ion beam milling. This crystal is attractive for high intensity frequency conversion due to its high damage threshold. We demonstrate an application of our patterning method for shaping the fundamental beam, as well as the second harmonic beam that is generated in the crystal. We fabricated six different phase masks that generated the following beam profiles in both wavelengths: on- and off-axis high order Hermite-Gaussian beam, Airy beam, vortex beam, lens and a periodic Bragg grating. Such an optical device opens up new possibilities for compact beam shaping in high power nonlinear interaction in a broad range of frequencies.