Picbasic pro is supported in microchip MPLAB IDE.
You can compile/debug with it and produce the standard HEX files.
The P16PRO40 seems to support the HEX files, so if you configure the MPLAB to work with PICBASIC PRO, when ready you compile and generate the .HEX file. Then load it (the .HEX) in P16PRO40 and program the chip. Whitch configuration you need, the MPLAB one?
For MPLAB configuration first download "http://www.melabs.com/downloads/PBPlugins.zip
Expand it in a working directory (your project for example) and run the batch function (register the DLL). In MPLAB goes in "Project > Set language Tool location" browse and set PBPW.EXE as the compiler. In MPLAB you need to work with project, so create a new one and write or load an existing sample then compile it. That's all.