I'm an Erasmus student and I've had pleasure to meet a really great teacher who taught me more than anyone before. I would like to show my appreciation and thank her, but I'm leaving a week before the end of the course - and the grades release. I want to be polite, appreciative and show my respect not to be a "teacher's pet" (I'm an Erasmus, I don't care about the grades, just the learning experience). Should I came to her after the class and simply thank or send and e-mail or I'll be just making a fool of myself?
You won't be making a fool of yourself, we all appreciate a "thank you"...
You can choose to say in person, and your idea of "thank you for the learning experience" is good.
An email can also be fine, which you can send to arrive after the grades come out if that is a concern for you.
Do it, it will be fine. Or do both...
Edit, as Bob points out a handwritten note or card is also good.
Thanking a prof in person is a tremendous thing to do. I recommend it highly. I also recommend returning later (years, perhaps) and thanking her again if possible.
However, if you want to do it by email, also copy the department head or dean on your mail.
I doubt that grades enter in to it in any case. If you are sincere, it will be recognized and appreciated.