Shift lenses allow you to compensate perspective distortions (converging verticals) by shifting the optical path off its horizontal axis. By doing so the projected image (rectangle) on the film/sensor plane gets distorted to a trapezoid negating the original effect.