An integral approach to plasma shape control