how can i make a rig follow a shapekey deformation?
Not sure it's possible. Editing a rig in animation compromises the relation bone - weights. Mesh weights become wrong and the rig influences it's mesh in a wrong way.

What I've seen in such problematic, is to have two models, each with it's individual rig, and when one model morphs to take the shape of the second, they simply switch the visibility.