Heat a 9-inch deep skillet over medium heat and melt the butter.
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 tossing to coat with butter and garlic.
Stir in the fresh basil leaves and sauté for 2 minutes.
Pour in the vegetable stock, cover the skillet, and cook until the ravioli are tender, about 8–10 minutes.
Remove the lid, add the white navy beans and basil pesto, and cook uncovered for another 3 minutes to heat through and slightly reduce the liquid.
Season with salt and a pinch of chilli flakes to taste, then sprinkle with Parmesan if desired and serve immediately.