All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu 'alyhi wa sallam, is His slave and Messenger.
This type of partnership is called Mudhaarabah and Qiraadh under the Sharee‘ah. It is permissible and the Companions used to practice it. For the partnership to be valid, the profit must be shared among the partners according to a fixed rate on which they agree, for example, to be one half each, or one third to two thirds, or whatever they agree.
In case of loss, both the owner of the capital and the worker shall incur the loss: the owner of the capital will sustain the loss of his money and the Mudhaarib (worker) will lose his efforts.
You can let your share of the profits be added to the capital contributed by your friend, and you will be entitled to a percentage of the profit that is proportional to the contributed sum. However, you should inform your friend beforehand of this, and if he does not permit that, then you should withdraw your contributed sum.
Allaah Knows best.