So what is its use? What can it do? If it was there uptil now, what is its use?
It can attack people while being invisible.
Only someone with the Rinnegan can see it and someone with the sage his sage powers can sense it.
Only people with the powers of the sage can attack it.
Everyone else cant see it, cant sense it and cant attack it.
So its use is quite powerful as you can tell, because it can attack everyone else, while invisble, not being possible to sense and not being attackable.
Howevery, every damage the shadow madara takes, goes back to the real madara every once in a while, when the shadow madara and the real one combine. Naruto and Sasuke can attack the shadow Madara as you probably understood now.