What is the best way to install a shower curtain when one wall is sloped
Get a swivel shower rod flange like this:

or this:

It looks like they're available in a range of sizes and finishes so you should be able to find one you like.