Hello Sven,
nice to meet you here
I would suggest to implement a enrolment-plugin . Look in your Moodle-folder, there is a folder named "enrol" (as far as I know you have Moodle 1.4.1). There you can create a directory for your plugin, write a class enrolment_plugin, which extends the "enrolment_base" (see enrol.php in moodle/enrol) and overwrite the functions as you want. How this is done, you can see in the other enrolment-plugins...
For example overwrite "check_entry()" to look, if the user has paid, in "print_entry" you could inform your students that he has to pay for the course and put a link to your shop...
Hope that helps,
Sven Schneider