K.P.
I'm assuming that the children are older b/c otherwise they wouldn't be unsupervised for extended periods of time...
So, I would suggest speaking to your friend directly. Let her know that the "rules" in your house are... and then spell them out. Tell her that you value your friendship, but you are concerned that your son may start imitating the behaviors and/or retaliating and that is not okay with you. Suggest that she seek-out a parenting course (there are a lot out there if you look at your county's "family services" website) and figure out how to control this little monster before he goes to school. It won't be tolerated there either and it's going to make for a really rough road ahead.
If they are young (not yet Kindergarten), don't leave them alone for many many reasons, but in this situation you both need to be there to IMMEDIATELY and STRICTLY address the behavior. Time out may not work for this child, but it's worth a consistent try!