I have an music items that are scored by users between 1 to 5, and I need a formula to get the 5 most scored items.
But obviously an item that get 3.5 average score
The reddit scoring algorithm is probably the best bet if you really want to do it the right way. It's explained in detail here and at a high level by xkcd author Randall here.
The problem is it doesn't really work for five-star ratings which is what you're going for. You should be able to generalize reddit's sorting system to use ratings. Heck, it's probably done somewhere already. I'm going to look for it.