how do you merge two bones into one? I have a generated mesh and set of bones from a makehuman model but it created two bones in the shin.

How do I merge the two selected bones into one bone but keep the skeleton intact, i.e. the knee and foot where it should be.
With the two bones selected like in the picture in your question, simply press AltM.
That will merge the two bones and take care of the bone relations.





Or You could achieve the same thing in more steps by deleting the two bones, and "filling" a bone between the two ends that are left. Then going and editing the Bone Parent and checking Connected for the top bone.