View the original recipe via:
Fill a medium-sized pan with water and bring to a boil. Rinse the beans and remove the ends. Cook them in the boiling water for about 5 minutes, until they're al dente.
Meanwhile peel and finely chop the onion and garlic cloves. Rinse the tomatoes, remove the hard parts and chop into smaller pieces.
Make sure the jars are sterile, you can easy do this by cooking them for a few minutes in boiling water.
Use the medium-sized pan again and heat a bit of oil. Sauté the onion and garlic for a few minutes before you also add the tomato chunks.
Cook for a few minutes and if necessary a bit longer to create a thicker sauce if the tomatoes are quite watery. Add the cooked beans and season with pepper and salt.
Divide basil over the jars and then also divide the bean-tomato mixture over the jars. Make sure they're as hot as possible and then put the lid on.
Let them cool off completely and now you can store them for a very long time in a dark spot with as few temperature fluctuations as possible. Enjoy!