The detection and characterization of exoplanet atmospheres is currently one of the main drivers pushing the development of new observing facilities. In this context, high-resolution spectrographs are {proving} their potential and showing that high-resolution spectroscopy will be paramount in this field. We aim to make use of ESPRESSO high-resolution spectra, which cover two transits of HD209458b, to probe the broadband transmission optical spectrum of the planet. We applied the chromatic Rossiter-McLaughin method to derive the transmission spectrum of HD209458b. We compared the results with previous HST observations and with synthetic spectra. We recover a transmission spectrum of HD209458b similar to the one obtained with HST data. The models suggest that the observed signal can be explained by only Na, only TiO, or both Na and TiO, even though none is fully capable of explaining our observed transmission spectrum. Extra absorbers may be needed to explain the full dataset, though modeling approximations and observational errors can also be responsible for the observed mismatch. Using the chromatic Rossiter-McLaughlin technique, ESPRESSO is able to provide broadband transmission spectra of exoplanets from the ground, in conjunction with space-based facilities, opening good perspectives for similar studies of other planets.