how is the character Shylock a villain
As we have seen(put the Q in the search MV box, above right), one might first explain what meaning of the term "villain" one is writing of. It seems to me that we have also seen here and elsewhere that Antonio and Shylock might be regarded as co-comic villains or comic co-villains or twin villains. The character Solanio, I believe, is the only character to refer to Shylock directly as a "villain." This same character also correctly predicts that "the Duke / Will never grant this forfeiture to hold"(3.3.26 or so).
In Shakespeare's "The Merchant of Venice," Shylock emerges as a greedy villain. He loans Antonio money, charges high interest rates, and when he is not repaid, he insists on cutting flesh off of Antonio's body to pay for the debt. This tactic is horrifying and the reader cannot help but feel disgust and dismay towards Shylock, who resorts to such an extreme measure to ensure he is paid back.