Both parties contribute to the house price and become real co-owners according to their contributions. This is joint ownership (شركة الملك), not merely a financing label.
The ownership must be real rather than only documentary. Rights, benefits and the relevant ownership risk should follow the share actually owned at that stage.