How to write it?
よろしく
ヨロシク
宜しく
宜敷
When writing よろしく, You can use either Katakana, hiragana or kanji.
We usually use よろしく.
ヨロシク is casual and I guess, it’s a bit old fashioned. That may be just me though.
宜しく is pretty formal.
This isn’t included in 常用漢字 (commonly used kanji), so it’s better to avoid using it even in a business setting.
You can see it in a formal invitation such as for a wedding.
宜敷 is seldom used nowadays, but you can see it in classic novels, such as those written during the Meiji period.
敷 is called 当て字, which means that the kanji was chosen for its sound alone, without regard to its meaning.
Advanced Tips
夜露死苦
This is a good example of 当て字. You can see it in comics that tell the story of Japanese punk kids. I guess most Japanese people can read it.