This study presents a multi-objective optimisation technique for determining the optimal number of in-line Emergency Shutdown Valves (ESDVs) for pressurised CO2 pipelines, aiming to balance risk associated with pipeline failure against the valve cost based on treating the risk as a probabilistic variable. Using standard Probability Density Functions (PDFs) to model the uncertainties inherent in pipeline characteristics and operating conditions, we perform a Monte Carlo simulation involving the random sampling from these PDFs to derive a probabilistic distribution of risk. This method contrasts with traditional deterministic methods that rely on assuming the worst-case failure scenario or pre-determining an averaged expected risk level — typically calculated by summing the products of failure frequencies and consequence magnitudes for various representative failure scenarios. The proposed approach integrates the risks of all possible failure scenarios directly into the optimisation process without such assumptions or pre-determinations, assessing them collectively based on their individual probabilities of occurrence. Our findings illustrate that the proposed technique allows for more reliable and effective ESDV configurations compared to the traditional methods. This approach not only facilitates safer CO2 transport within the context of Carbon Capture, Utilisation and Storage but also offers a framework for optimising pipeline ESDV configurations in general.