All you need to do is put the path to the DLL in the "References" textbox that is located below the code, then the script will compile with that resource. For SHDocVw.dll, you might need to do some extra steps and either make or find an Interop library so that .NET knows how to work with it.
I've attached a screenshot of the references text box for you