Fourth-top Motherwell are now without a win in five games and twice handed Hearts chances early on through their own mistakes.
Shankland stabbed an effort wide, then Paul McGinn cleared from in front of his own goal after goalkeeper Calum Ward was dispossessed by Braga.
Ward made up with that with a fine, one-handed save from an Oisin McEntee header from point-blank range, while home goalkeeper Alexander Schwolow saved athletically from both Elliot Watt and Ibrahim Said from long range.
Home midfielder Blair Spittal fired a curling drive just wide before the break, but it was Motherwell who took the initiative after the break and Tawanda Maswanhise's low ball was swept home by Longelo at the back post.
However, when Stuart Findlay rose to meet a corner at the back post, Braga's overhead kick from 12 yards trickled over the line.
That inspired Hearts initially, but Longelo and Elijah Just both side-footed good chances wide before Maswanhise squandered Motherwell's best chance of a winner when firing just past after leaving two home defenders chasing shadows.
Hearts' nerves eased when Stephen Welsh's boot connected with Kabore's head as the centre-back attempted to clear and Shankland slotted in the resultant spot kick, then Kabore fired home a solo effort off the near post.
Kabore found the net again in stoppage time only to be ruled offside, but Hearts were already home and dry.