All you need to do is place a campfire one block under the beehive and the smoke will chase the bees from the hive. Once that happens, use the shears to get the honey safely. But remember to get rid of the campfire afterward so the bees can go back to getting honey for you.