Justice and mercy are obviously major concerns in the play. They are explored at great length in the courtroom scene (Act 4, Scene 1), to which the whole play leads up.
Shylock insists (for example, in lines 89 - 103) that in demanding his pound of flesh he is asking for no more than justice, because it was guaranteed to him in the contract ("bond") drawn up by himself and Antonio. Portia, in her speech (lines 182 - 203), shows that while justice is an admirable and necessary value, mercy is even more sublime, and furthermore is something that every human being has need of. But though justice is set against mercy in the play, justice is not written off as being of no value. Even Portia, in her disguise as Balthasar, acknowledges that if Shylock's contract is merely overruled, then everyone will know that the laws of Venice are not fairly enforced.
Friendship and loyalty surface in nearly every relationship in the play, but they are seen most clearly in the friendship between Bassanio and Antonio. It is to a back a loan to Bassanio that Antonio enters into his fateful contract with Shylock. Though Antonio had no idea it would cost him so much, he has already assured Bassanio (Act 1, Scene 1, lines 138 - 139), that "My purse, my person, my extremest means/Lie all unlocked to your occasions." Ultimately, Antonio is willing to die for his friend.
Bassanio, who was reluctant to ask the favor in the first place, is horrified at the position he has accidentally put Antonio in. By the time Shylock is ready to claim his pound of flesh, Bassanio has come in to some money, and in the courtroom (Act 4, Scene 1) he frantically offers to the pay debt, even up to ten times the original amount, or Shylock can take "my hands, my head, my heart" (lines 209 - 210). Shylock will not accept this offer.
Luckily, Antonio is saved by the cleverness and pluck of Bassanio's wife Portia. She goes to great lengths to save the life of her husband's friend, whom she has never yet met, showing an even higher level of friendship and loyalty.