The Umweltbundesamt (sort of German EPA, I figure) recently released a new study on the "Ecologisation of online shopping" - which obviously is in German. Anyway, core findings are that individual shopping using your wonown car is the worst (CO2-wise) with 600 to 1100 g CO2 (for a 5 km ride to the store), while delivery is better due to optimized routes and vehicle utilization, which sum up to 200 to 400 g CO2. Still, cycling beats both options on the last mile.
Important side notice: The last mile (transport & selling) makes up 10 % tops of the ecological foot print of your product. Therefore, it is way more important to buy sustainable goods in the first place.