Wavefront Shaping and Pupil Engineering