In The Merchant of Venice, Bassanio needs to borrow money from Antonio so that he can pursue a possible marriage with Portia who is actively seeking a husband, in terms of her late father's will. She would be happy if Bassanio chose her as he is "best deserving a fair lady."(I.ii.107)
Bassanio has approached Shylock to discuss the terms of a loan based on Antonio's good name. Antonio would have lent Bassanio the money but his wealth is tied up "abroad" at that time. So Shylock has agreed to loan the money but he and Antonio do not see eye to eye and they both distrust and dislike each other immensely.
Shylock, however, is a businessman and so he will "buy with you, sell with you, walk with you, talk with you and so following"(30-31) as he would with any other business associate but he will not "eat with you, drink with you, nor pray with you"(32) because they are things a person does with his friends which Antonio and Bassanio are not. Shylock is offended by "the smell of pork" and the Nazarite (which refers to Jesus) fooled the devil so perhaps Bassanio and Antonio intend to fool him. Therefore, he will not dine with them.