First of all, for an easy life, I'd recommend using a PIC with 2 SPI ports for PIC2.
However, if you are sure you want to use just one SPI port to be a master sometimes and a slave then the thing to keep in mind is that you really don't want both PICs to try to drive the serial line at the same time. You may have to write the TRIS registers to make the port tristate go high-z as well as disabling the spi peripheral.
If you put some series resistors in then things will be less bad if e.g. pic1 tries to drive SCLK high while pic2 is trying to drive it low then the current flowing from pic1 to pic2 will be limited
You could use an extra GPIO to allow pic2 to tell pic1 when it is busy. You need to have a clear idea of the flow of execution between the 2 devices so that you don't get caught with race conditions etc
for example you could have a flow of
- pic1 sends 'write pot please' command to pic2
- pic1 knows to wait for the busy signal
- pic2 then asserts a busy signal
- pic1 sees a busy signal and knows to now wait for it to clear before starting another spi transaction
- pic2 does the spi transaction with the pot
- pic2 clears busy signal
- pic1 is sees busy signal has cleared and knows that it is ok to do spi transactions
- pic2 will not try any spi transaction until it gets another 'write pot please'
There are loads of ways to implement something like this. The important thing is to know clearly what the flow is going to be before you start implementation