What do you mean by "pin"? If you just want it to rotate in place use a revolute joint:
rjd.Initialize(ground, body, b2Vec2(1.0f, 1.0f));
ground is a static body.
If you also don't want it to rotate you should also use rjd.enableLimit = true;
If you don't want the body to interact with other bodies (i.e. bodies will pass through it), use body->SetActive(false);
If you want the body to stay in place until another body collides with it use body->SetAwake(false);