1.Preheat oven to 200°C/400°F. Oil an oven tray.
2.Place tomatoes on oven tray; drizzle with half the oil. Bake about 15 minutes or until tomato skins start to split. Cover to keep warm.
3.Meanwhile, cut corn kernels from cobs.
4.Combine buttermilk, egg, ricotta, flour, chopped basil and corn kernels in a medium bowl; season.
5.Heat remaining oil in a large frying pan. Pour ¼-cup of corn mixture into pan (you can cook four at a time); cook about 2 minutes each side or until cooked through. Remove from pan; cover to keep warm. Repeat with remaining corn mixture.
6.Cook bacon in same heated frying pan until crisp.
7.Serve corn cakes with pesto, tomatoes and bacon; top with basil leaves.