I don't know if I can talk about "rules" here, but in this case the past participle ("prestada") is working as an adjective, so it agrees in gender and number with the noun ("pala").
Maybe someone else will have a more complete explanation, but this is something that happens when you borrow something:
- Me traje prestado el coche de mi papá.
I borrowed my dad's car. (He may or may not have let me take it, but I brought it with me anyway.)
- ¿Cómo que Juan tomó prestadas mis llaves?
What do you mean Juan borrowed my keys? (Since I'm asking, I obviously didn't lend my keys to Juan, but he took them anyway.)
- Luisa se llevó prestados mis zapatos, pero no me los ha devuelto.
Luisa borrowed my shoes, but she hasn't given them back to me. (Here I did lend her the shoes; of course, I expect her to bring them back).
Attention: if you say "ella le pidió prestar la pala", she is actually asking her neighbor to put the spade available for anyone to borrow.
__________________
♪ ♫ ♪ Ain't it wonderful to be alive when the Rock'n'Roll plays... ♪ ♫ ♪
|