Create a component in my database and paste your code into a function within the component. You might also want to post PEP2 questions to the pronto pro forum.
You may also want to enable advanced mode in pep2 under the options menu.
Once you have a new function added, you must add the component to your project or replace an existing component with the updated one to have the new function made available in PEP2 for use in your project.
Email me if you still cannot figure it out. Some screenshots would be really helpful.