"b2SetBodyTransform" is correct. It will only stop the body from reacting to the simulation if you use it every loop (for obvious reasons!)
To restrict rotation, there is no specific joint for it (yet) but you can simulate it using a revolute joint and an extra body.
Create a low density small circular body 'behind' the body you want to restrict, centred on your body's centre of mass (you can get the coordinates of the centre of mass with "b2GetBodyWorldCenterX/Y") and disable rotation on this small body ("b2SetBodyIsRotationFixed").
Then create a revolute joint between the two bodies, again at the centre of mass.
You can enable limits on the revolute joint with "b2SetRevoluteJointIsLimitEnabled" and "b2SetRevoluteJointLimits" to set whatever limits you want

.
[b]
