First of all, don't panic, you're not alone! I have done this a few times already. Here's my approach:
1. Identify "enduring business themes" in the code. This means basically a group of code that can be predictably tested by feeding certain input and expecting certain output. For example, you know that if you order two pens, a purchase order for two pens will come out the other end.
2. Once you establish a few of these scenarios you can write a few high-level unit tests. These will help you acertain whether or not this code works ok.
3. Once you have this, you're on your way to having test driven development in place. When any code changes have been done, quickly run your unit test to ensure results are still ok. If not, it means code change broke something (test driven quality assurance).
4. Now you can dig deeper and make more detailer fine grained unit tests.
Most times the best you'll be able to do is to lock in existing code base with a handful of solid high level unit tests and ensure that any new code is tested properly.