The court awarded life imprisonment to Muhammad Omar, a teenager would-be suicide bomber who was captured during the attack.
Omar was injured after the first blast and his suicide jacket did not explode completely.
Four other men accused of involvement in the attack were acquitted for lack of evidence.
A large number of people were present in the shrine when a blast ripped through it in April 2010.