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 burn it.
Add the fresh ravioli and baby tomatoes to the skillet and sauté together for about 1 minute to warm the ravioli and soften the tomatoes.
Stir in the fresh basil leaves and sauté for another 2 minutes.
Pour in the vegetable stock, cover the skillet, and cook for 8–10 minutes, or until the ravioli are tender, checking once to ensure there is enough liquid.
Uncover and add the white navy beans and basil pesto, stirring gently; cook for about 3 more minutes to heat through and combine flavors.
Season with a pinch of chilli flakes and salt to taste, then finish with a sprinkle of Parmesan cheese if desired and serve immediately.