Using time capsule as a shared iTunes library
No, the Time Capsule doesn't have the software to run an iTunes library. 

It can be used as external storage as you mentioned configuring it as a shared location. In this case iTunes would be running on another computer rather than on the Time Capsule.