Heat a 9-inch deep skillet over medium heat and add the butter until melted.
Add the minced garlic and sauté for about 1 minute until fragrant, taking care not to brown it.
Add the fresh ravioli and baby tomatoes to the skillet and sauté for 1 minute, gently stirring to combine.
Add the fresh basil leaves and sauté for an additional 2 minutes.
Pour in the vegetable stock, cover the skillet, and simmer until the ravioli are tender, about 8–10 minutes.
Uncover and stir in the white beans and basil pesto, then cook for another 3 minutes to heat through.
Season with salt and a pinch of chilli flakes to taste, sprinkle with Parmesan if using, and serve.