We have proposed a compact scheme for generating high-density and high-energy positrons by irradiating different shaped targets with an ultra-intense laser pulse, using 2D particle-in-cell simulations and numerical analysis. Our simulations show that the Breit–Wheeler process dominates positron production during laser-target interaction when a laser with an intensity of 4×1023 Wcm−2 is used. We obtain a positron beam with an energy of 2.5 GeV and a total number exceeding 109, which is an improvement by two orders of magnitude compared to previous work with the same laser intensity. By using different shaped targets, we are able to generate a high-energy positron beam with low divergence. The yield of positron pairs depends on both the target and the laser parameters, and we have investigated how the shape of the target can enhance pair production and reduce divergence. Both of our analytical and simulation results demonstrate that this high-flux and low-divergence positron beam has direct applications in the field of medical and astro-physics that can be explored in the upcoming high intensity laser facilities.