A Muslim man who was whipped 40 times for drinking alcohol was told to remember the pain next time he thought of picking up a drink, a Sydney magistrate has been told.

Zakaryah Raad, 21, Tolga Cifci, 21, Wassim Fayad, 44, and Cengiz Coskun, 22, faced Burwood Local Court today charged with lashing Christian Martinez, 31, with an electric cable as punishment under sharia for drinking alcohol.

The four men have pleaded not guilty to assault occasioning actual bodily harm and stealing CCTV footage from Mr Martinez's apartment in Silverwater, in Sydney's west, in the early hours of July 17 last year.

The court heard Fayad, also known as Fadi Alemaddin, carried out the alleged whipping while the three other men held Mr Martinez down on his bed.

Fayad had become Mr Martinez's "spiritual leader" after he converted to Islam before the alleged incident, prosecutor Sevinch Morkaya said.