Let's see...First question should be: how does the transformation work?
I think you'd have to modify the shifters DNA in some way. For that, you could use nanomachines or a simple engineered virus to inject and change the shifters DNA. That might be via injection (virus), or radio signal (machines that were injected earlier) or anything that suits your world.
Since we do not know how human cells react to sudden DNA change, there's no way of knowing what will happen now, but probably it will kill you. Usually, cells can't just change their specialisation and become something else, this ability is limited to stem cells. So the first part should be: change all the cells back to stem cells. Or: change them in a way that all newly build cells become stem cells (remember, your cells split from time to time). But careful now: if you change a cell back to a stemcell, it is possible that it loses its functionality.
At this point, i imagine nanomachines would work best, because they can control the process much better. For example, to transform the lung they would start by "melting" one half of your lungs, rebuilding it and respecializing the cells, while the other half keeps you alive. Then, when the new organ is functional, they'd change the other half. For other organs, e.g. liver, they'd temporarily establish a second "emergency liver" while transforming the primary organ. Since these machines can make cells into stem cells and back, they could use ANY tissue to create ANY organ, so why not a makeshift liver from your second kidney? (btw. this would mean that in the world where shapeshifting is possible via machines, almost all injuries and all sicknesses would be curable).
Overall, i think the process would require quite some time, probably be not painful at all (machines will just shut down the nerves before destroying stuff), and most of all: it needs energy to no end.
Funny thing is: i see no reason why these nanomachines couldn't build you into anything they want, as long as they have the blueprints. But maybe their data storage ability is... quite low, so they can only store one creature-blueprint at a time?
contrary to some other answers i don't think hygiene or .. "waste disposal" would be problems. Your organism is being reconstructed by nano-machines... they can power up your immune system so it kills anything that doesn't belong into your body. If they don't do that themselves.
I do see a problem, though, when it comes to "what does the creature do while transforming". Rebuilding bones, muscles, sinews and everything will take time. So you are definitely not mobile during that time. But if the transformation blocks calory intake, that's a bad thing. So i suspect the process might work around that. First, create a makeshift mouth right on your stomach. Start by transforming head and one arm. When both are done, the user can eat again, so now do the other arm, and remove the makeshift mouth and so on....
I think one might accelerate the process, if you submerge the body in a fluid enriched with nutriments and oxygen. In that case, the body could be supplied from everywhere without paying too much respect to keeping it fed. So the machines might place the shifter in some kind of coma, and just go wild on transforming everything except the brain into liquid goo and back. :)