Obviously, I understand Schultz being unwilling to shake Candie's hand but his actions were dangerous and foolish. They worked so hard to free Django, track down Brundhilda, and get her out of Candiland. The plan almost became unraveled but Candie was still willing to follow through with the transaction after realizing their true goal. All Schultz had to do was shake his hand, seal the deal, and the three of them would walk away and live happily ever after. Sure, Candie was a violent racist but he knew that going in and up until that point, had no trouble shaking his hand and giving him his money. He had suffered his company that long, what's a few more seconds?
He knew killing Candie would result in not only his death but it would mean almost certain death for Django and possibly Brunhilda. If not death, they would likely be tortured and sold back into slavery which ended up happening. Granted, Django escaped and took Brunhilda away anyway but Schultz had absolutely no guarantee that would happen. For all he knew, after he was shot, the other two were killed moments later. In the unlikely event the two of them could escape, they would still be wanted by the authorities for murder and good luck trying to find any jury in the entire country that would sympathize with them. Again, this is opposed to them walking out of Candiland as free slaves who the law couldn't touch. It was a reckless and selfish action that really bugged me.