Locate a law degree program that is valid in Germany. If you check the Master of Laws degrees that are available worldwide at LLM-Guide (See reference) then you should be able to find a variety of law degree programs that meet this need.
Apply to an acceptable law degree program that will give you a degree that's valid in Germany. Make sure that you keep in mind any language or attendance requirements, and if it will require you learning German or moving to Germany to complete the degree. Also, check and make sure that your educational requirements are valid and that they will be accepted overseas.
Complete your coursework and earn your degree. Once you've finished, you will have a degree that is accepted by German law and the German court system.