How to legally manage money for 4-5 people?

how to legally manage money for 4-5 people? i want to invest monye of only about 4-5 prople in the stock market. how can i do so legally? can i do it from home?