You can get the pilot code as:
[code php]
<?php
$pilot = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid);
This will return:
VMS001
Depending on the format specified for the pilot id's.
And yes you can sign in with just an ID or a string with ID. It doesn't make a difference, since any leading text is stripped and just the ID is used, so VMA0001 will be stripped to 0001, and then leading zero's are erased. Generally people will use VMA001, or whatever their pilot ID is, so that's ok.
Refer to API docs:
http://docs.phpvms.net/api/
There's a couple other threads about forum integration, that will be the basic code you need to use, except just replace the SMF specific code with phpBB, and you should be set.