Hello and Thank you for using Just Answer. I am sorry that you had to hear about your daughter viewing inappropriate computer sites. It is just out of a natural curiosity at her age even though it is not correct behavior.
When your daughter arrives home from school, sit down and have an open and honest communication session with her. Explain what you found on her computer and your feelings about it. Then allow your daughter to tell her side of the story. If you know for certain that her friend was involved in looking at the sites as well, inform her parents either by phone or in person if you know them well.
In this situation, honesty is the best route. Looking at inappropriate sites could lead to inappropriate actions down the line and you must nip this in the bud now. If you discover that your daughter continues to look at sites, you can monitor the sites by putting on a parental control on the computer to see exactly what she is looking at. You would need to contact your computer servicer as to how to do that. Also, you can just take her computer away for a while and only allow her to use it for school assignments under your supervision.
Hope this helps. If you need more advice, just ask. Have a great day!!!