We present an integrated optical phased array (OPA) which embeds in-line optical amplifiers and phase modulators to provide beam-forming capability with gain and beam steering in the 1465–1590 nm wavelength range. We demonstrate up to 21.5 dB net on-chip gain and up to 35.5 mW optical output power. The OPA circuit is based on an InP photonic integration platform and features the highest measured on-chip gain and output power level recorded in an active OPA (i.e., with amplification), to the best of our knowledge. Furthermore, the OPA enables the independent control of both amplitude and phase in its arms and through this we demonstrate programmable beam shaping for two cases. First, we carried out a Gaussian apodization of the power distribution profile in the OPA emitter waveguides, leading to 19.8 dB sidelobe suppression in the far-field beam, which is the highest value recorded for active OPAs, and then we demonstrated beam forming of 0th, 1st, and 2nd order 1D Hermite–Gaussian beams in free-space.