A Melbourne woman who pleaded guilty to having sex with a 15-year-old boy has avoided jail time but will be a registered sex offender for the rest of her life.

Rebecca Nally, 26, pleaded guilty to two counts of the sexual penetration of a child under 16 after she had a sexual relationship with the teenage boy last year.

She has been sentenced to a two-year community corrections order and 150 hours of community service.