The most important thing upfront: Just bills will not help you at all. What you need is a special tax refund document issued by the shop where you purchase something. Beware that not all shops offer that service. So you better check twice before buying.
You will find some information on the website of the EC.
They make an example there which exactly matches your question:
"Example: John came from the US for a vacation in Europe. He bought a designer bag in Paris; some clothes and shoes in Milan and London. In each shop, he got refund forms filed. Within a month, John leaves to US from London. At the airport, he shows the purchased goods to the customs officer and gets the refund documents stamped."
Please note there will be a minimum purchase threshold and there will be a processing fee. So if you are only buying smaller items it may not be worth the hassle as VAT is 19% in Germany. If you're shopping for several thousands of EUR it will be worth it, of course.