The easiest way is probably to retrieve the PV from the hash table, i.e. you
probe the table for the root position (which has been put into the table just
before exiting from the search, so at least that must be present) and retrieve
the associated move, then play this move to get a new position, probe that one
again and so on. You may get a PV as short as a single move because usually
there's no guarantee that other entries are there, but in practice you will
get a good PV most times.