That depends on how you want to get to shard 2. If you click re-spawn you will lose all your rooms/claims on Shard 3, and will beable to respawn anywhere else you should choose including in 'respawn areas'.
However, if you do not want to lose your Shard3 rooms you can do multi-sharding. Bordering your respawn area there are rooms with no controllers generally referred to as 'highway' rooms. Crossroads of these highway borders contain portals to other shards Shard 3 -> Shard 2, Shard 2 -> Shard 1 or Shard 2, and so on.
When a creep steps on the portal, it is transported to the other shard, only retaining its body and name. It will get a new ID and will have no Memory. You will have to set up a system to restore/initialize new memory for it.
As well your code as you have it now will also run on Shard 2, if you have hard-coded references these may break as you don't have the same things on Shard 2 as Shard 3. You'll need to account for this as well.
Similar to claiming other rooms, you need to send a creep with at least 1 claim part though the portal and into a room to claim on the other shard, then send builder creeps to build the spawn.
Its a fun challenge. Good luck.