Effect of deformation on half-life of two-proton (2p) radioactivity is investigated across the periodic chart for nuclei with Z<82. 2p-decay half-lives are estimated by employing our newly proposed semi-empirical formula wherein the nuclear deformation has been incorporated in a phenomenological way. Robustness of the formula is demonstrated as it estimates the measured values quite accurately and, hence, reliably applied to predict the other possible 2p-emitters. For many proton rich nuclei for which experimental data on the decay energies are not available, we have used the theoretical values obtained from our calculations using the relativistic mean-field (RMF) approach. The uncertainties in the theoretical decay energy values are minimised by machine learning (ML) technique. Correlation of 2p-radioactivity with 2p-halo and deformation is probed. Our calculations show the phenomenon of shape coexistence in several 2p-emitters, wherein the prolate shape is found to be more predominant for the ground state.